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:
authorDalai Felinto <dfelinto@gmail.com>2017-12-29 14:55:13 +0300
committerDalai Felinto <dfelinto@gmail.com>2017-12-29 14:55:13 +0300
commitf2a24afe8c1aa0221b378585e3c1901cc568a6d7 (patch)
tree630c9aa94e9465f5bb4302e92761857a668ec12f /source/blender/editors/space_outliner/outliner_tree.c
parent2b7f36300e0cbf1eede46f61404f799944aea975 (diff)
Fix T53647: Outliner crashes when active object is deleted
Based on patch by Philipp Oeser (lichtwerk).
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_tree.c')
-rw-r--r--source/blender/editors/space_outliner/outliner_tree.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c
index a9c9ab74970..0d0714a3453 100644
--- a/source/blender/editors/space_outliner/outliner_tree.c
+++ b/source/blender/editors/space_outliner/outliner_tree.c
@@ -1958,8 +1958,10 @@ void outliner_build_tree(Main *mainvar, Scene *scene, ViewLayer *view_layer, Spa
outliner_add_collections_master(soops, scene);
}
else {
- ten = outliner_add_element(soops, &soops->tree, OBACT(view_layer), NULL, 0, 0);
- ten->directdata = BASACT(view_layer);
+ if (BASACT(view_layer)) {
+ ten = outliner_add_element(soops, &soops->tree, OBACT(view_layer), NULL, 0, 0);
+ ten->directdata = BASACT(view_layer);
+ }
}
if ((soops->flag & SO_SKIP_SORT_ALPHA) == 0) {