Fix: Crash when closing window while Outliner shows screens

Steps to reproduce were:
* From factory settings, change Outliner Display Mode to "Blender File"
* Open "Screens" item, make sure all listed screens are visible
* Open Preference window, close it
* Mouse hover the outliner -> crash

Fix is to force an Outliner tree rebuild when closing screens.
This commit is contained in:
Julian Eisel 2020-06-19 19:55:17 +02:00
parent 254f164b27
commit 0ded6f5525
Notes: blender-bot 2023-02-14 08:10:10 +01:00
Referenced by issue #77348, Blender LTS: Maintenance Task 2.83
2 changed files with 2 additions and 1 deletions

View File

@ -215,7 +215,7 @@ static void outliner_main_region_listener(wmWindow *UNUSED(win),
}
break;
case NC_SCREEN:
if (ELEM(wmn->data, ND_LAYER)) {
if (ELEM(wmn->data, ND_LAYOUTDELETE, ND_LAYER)) {
ED_region_tag_redraw(region);
}
break;

View File

@ -463,6 +463,7 @@ void wm_window_close(bContext *C, wmWindowManager *wm, wmWindow *win)
BLI_assert(BKE_workspace_layout_screen_get(layout) == screen);
BKE_workspace_layout_remove(bmain, workspace, layout);
WM_event_add_notifier(C, NC_SCREEN | ND_LAYOUTDELETE, NULL);
}
}