From 04a391c2f852d785f481af566d4f5db8a29b6483 Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Wed, 8 Mar 2017 11:25:20 +0100 Subject: Outliner fix: prevent segfault when there is no active layer collection --- source/blender/editors/space_outliner/outliner_select.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/blender/editors/space_outliner/outliner_select.c') 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)) { -- cgit v1.2.3