From 52a6c4f34d4aba55bc179aa8df9d33883ea68ed3 Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Sat, 5 Dec 2020 14:41:20 +0100 Subject: 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. --- source/blender/editors/space_outliner/space_outliner.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to '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; -- cgit v1.2.3