Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <julian@blender.org>2020-12-05 16:41:20 +0300
committerJulian Eisel <julian@blender.org>2020-12-05 16:56:13 +0300
commit52a6c4f34d4aba55bc179aa8df9d33883ea68ed3 (patch)
tree1e981f1c2537a3ab218705299b71a2bbff0a0637
parent237f9da4a0b397f22e356c08c6968f8d2a461a9c (diff)
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.
-rw-r--r--source/blender/editors/space_outliner/space_outliner.c5
1 files changed, 4 insertions, 1 deletions
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;