[Bf-blender-cvs] [04a391c2f8] blender2.8: Outliner fix: prevent segfault when there is no active layer collection
Dalai Felinto
noreply at git.blender.org
Wed Mar 8 11:27:15 CET 2017
Commit: 04a391c2f852d785f481af566d4f5db8a29b6483
Author: Dalai Felinto
Date: Wed Mar 8 11:25:20 2017 +0100
Branches: blender2.8
https://developer.blender.org/rB04a391c2f852d785f481af566d4f5db8a29b6483
Outliner fix: prevent segfault when there is no active layer collection
===================================================================
M 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 dd89a36fe9..0707f728ff 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))
{
More information about the Bf-blender-cvs
mailing list