diff options
author | Julian Eisel <julian@blender.org> | 2020-11-07 03:23:36 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2020-11-11 21:08:43 +0300 |
commit | 5fb67573b5fb115a7b7f6588ef0fca6f07ee60d0 (patch) | |
tree | b8f068e3e88bbad3ec276e0eeb779b7045c5c9fa | |
parent | dc9a52a3032cec2553a3315ce0055f28b9959432 (diff) |
Fix possible null-pointer dereference in new Outliner tree building code
-rw-r--r-- | source/blender/editors/space_outliner/outliner_tree.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c index 4654377e7e5..991d831d6e0 100644 --- a/source/blender/editors/space_outliner/outliner_tree.c +++ b/source/blender/editors/space_outliner/outliner_tree.c @@ -2322,9 +2322,11 @@ void outliner_build_tree(Main *mainvar, space_outliner->runtime->tree_view = outliner_tree_view_create(space_outliner->outlinevis, space_outliner); - TreeSourceData source_data = {.bmain = mainvar, .scene = scene, .view_layer = view_layer}; - space_outliner->tree = outliner_tree_view_build_tree(space_outliner->runtime->tree_view, - &source_data); + if (space_outliner->runtime->tree_view) { + TreeSourceData source_data = {.bmain = mainvar, .scene = scene, .view_layer = view_layer}; + space_outliner->tree = outliner_tree_view_build_tree(space_outliner->runtime->tree_view, + &source_data); + } if (!BLI_listbase_is_empty(&space_outliner->tree)) { /* Skip. */ |