[Bf-blender-cvs] [52a6c4f34d4] master: Fix crashes with invisible Outliners on fullscreen or window closing

Julian Eisel noreply at git.blender.org
Sat Dec 5 14:57:21 CET 2020


Commit: 52a6c4f34d4aba55bc179aa8df9d33883ea68ed3
Author: Julian Eisel
Date:   Sat Dec 5 14:41:20 2020 +0100
Branches: master
https://developer.blender.org/rB52a6c4f34d4aba55bc179aa8df9d33883ea68ed3

Fix crashes with invisible Outliners on fullscreen or window closing

I didn't actually confirm this is caused by invisible Outliners. But I'm pretty
sure the error happens with Outliners that aren't initialized (so were open in
an area before, but another editor is active there currently).
In that case, the runtime data may not be set yet and that is fine.

Fixes T83420.

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

M	source/blender/editors/space_outliner/space_outliner.c

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

diff --git a/source/blender/editors/space_outliner/space_outliner.c b/source/blender/editors/space_outliner/space_outliner.c
index 3c6369d3090..3d675fdd9e4 100644
--- a/source/blender/editors/space_outliner/space_outliner.c
+++ b/source/blender/editors/space_outliner/space_outliner.c
@@ -414,7 +414,10 @@ static void outliner_id_remap(ScrArea *UNUSED(area), SpaceLink *slink, ID *old_i
         changed = true;
       }
     }
-    if (space_outliner->runtime->treehash && changed) {
+
+    /* Note that the Outliner may not be the active editor of the area, and hence not initialized.
+     * So runtime data might not have been created yet. */
+    if (space_outliner->runtime && space_outliner->runtime->treehash && changed) {
       /* rebuild hash table, because it depends on ids too */
       /* postpone a full rebuild because this can be called many times on-free */
       space_outliner->storeflag |= SO_TREESTORE_REBUILD;



More information about the Bf-blender-cvs mailing list