[Bf-blender-cvs] [0ded6f55259] master: Fix: Crash when closing window while Outliner shows screens

Julian Eisel noreply at git.blender.org
Fri Jun 19 20:14:24 CEST 2020


Commit: 0ded6f55259bbfcaf48d521b0fcefa082179b349
Author: Julian Eisel
Date:   Fri Jun 19 19:55:17 2020 +0200
Branches: master
https://developer.blender.org/rB0ded6f55259bbfcaf48d521b0fcefa082179b349

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 05f48eb5679..540e2405758 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 1ba22652157..e1b2285313c 100644
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@ -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);
   }
 }



More information about the Bf-blender-cvs mailing list