diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2017-03-08 13:25:20 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2017-03-08 13:27:11 +0300 |
commit | 04a391c2f852d785f481af566d4f5db8a29b6483 (patch) | |
tree | 9025c2836f3067fbe7c0bb9fe59cef462a4c578d /source/blender/editors/space_outliner/outliner_select.c | |
parent | 1345d298068fb8ee988211a2b0063ab6685a77c8 (diff) |
Outliner fix: prevent segfault when there is no active layer collection
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_select.c')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_select.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c index dd89a36fe9c..0707f728ff7 100644 --- a/source/blender/editors/space_outliner/outliner_select.c +++ b/source/blender/editors/space_outliner/outliner_select.c @@ -760,6 +760,11 @@ static eOLDrawState tree_element_active_collection( if (set == OL_SETSEL_NONE) { LayerCollection *active = CTX_data_layer_collection(C); + /* sometimes the renderlayer has no LayerCollection at all */ + if (active == NULL) { + return OL_DRAWSEL_NONE; + } + if ((tselem->type == TSE_SCENE_COLLECTION && active->scene_collection == te->directdata) || (tselem->type == TSE_LAYER_COLLECTION && active == te->directdata)) { |