Fix T81817: use-after-free when trying to open file from splash screen
The issues was that Blender was trying to refresh the splash screen region. However, opening the file browser closed the splash screen and freed the region. The fix is to simply not refresh the region. Has been approved in T81817.
This commit is contained in:
parent
fbffff26e4
commit
64aa6c68d5
Notes:
blender-bot
2023-02-14 09:19:09 +01:00
Referenced by issue #81817, heap use after free at clicking on splash screen's open button
|
@ -72,12 +72,6 @@ static void wm_block_close(bContext *C, void *arg_block, void *UNUSED(arg))
|
|||
UI_popup_block_close(C, win, arg_block);
|
||||
}
|
||||
|
||||
static void wm_block_splash_refreshmenu(bContext *C, void *UNUSED(arg_block), void *UNUSED(arg))
|
||||
{
|
||||
ARegion *region_menu = CTX_wm_menu(C);
|
||||
ED_region_tag_refresh_ui(region_menu);
|
||||
}
|
||||
|
||||
static void wm_block_splash_add_label(uiBlock *block, const char *label, int x, int y)
|
||||
{
|
||||
if (!(label && label[0])) {
|
||||
|
@ -217,7 +211,6 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *region, void *UNUSE
|
|||
block, ibuf, 0, 0.5f * U.widget_unit, splash_width, splash_height, NULL);
|
||||
|
||||
UI_but_func_set(but, wm_block_close, block, NULL);
|
||||
UI_block_func_set(block, wm_block_splash_refreshmenu, block, NULL);
|
||||
|
||||
wm_block_splash_add_label(
|
||||
block, BKE_blender_version_string(), splash_width, splash_height - 13.0 * U.dpi_fac);
|
||||
|
|
Loading…
Reference in New Issue