Outliner: Fix crash on duplicating scene

The function to determine if a collection was hidden was missing
a check to see if the layer collection was not null.
This commit is contained in:
2019-07-15 19:41:06 -06:00
parent e63b87fb4d
commit dda15a3e69

View File

@@ -515,7 +515,7 @@ static bool layer_collection_hidden(ViewLayer *view_layer, LayerCollection *lc)
if (parent) {
lc = BKE_layer_collection_first_from_scene_collection(view_layer, parent->collection);
return layer_collection_hidden(view_layer, lc);
return lc && layer_collection_hidden(view_layer, lc);
}
else {
return false;