[Bf-blender-cvs] [ef0ded4df38] blender-v2.83-release: Fix: Crash when closing window while Outliner shows screens

Julian Eisel noreply at git.blender.org
Thu Jul 2 09:33:38 CEST 2020


Commit: ef0ded4df38942f4c83001927c58a0a306cf3f34
Author: Julian Eisel
Date:   Fri Jun 19 19:55:17 2020 +0200
Branches: blender-v2.83-release
https://developer.blender.org/rBef0ded4df38942f4c83001927c58a0a306cf3f34

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.

===================================================================

M	source/blender/editors/space_outliner/space_outliner.c
M	source/blender/windowmanager/intern/wm_window.c

===================================================================

diff --git a/source/blender/editors/space_outliner/space_outliner.c b/source/blender/editors/space_outliner/space_outliner.c
index 9450136b6a6..deba4687231 100644
--- a/source/blender/editors/space_outliner/space_outliner.c
+++ b/source/blender/editors/space_outliner/space_outliner.c
@@ -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;
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c
index 8fb7e47cd45..1baf5ae7caf 100644
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@ -471,6 +471,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);
   }
 }



More information about the Bf-blender-cvs mailing list