diff options
author | Julian Eisel <eiseljulian@gmail.com> | 2019-09-19 16:39:20 +0300 |
---|---|---|
committer | Julian Eisel <eiseljulian@gmail.com> | 2019-09-19 16:42:48 +0300 |
commit | 1353158aa24b4ada82cc569543e765c5ff388e20 (patch) | |
tree | 58e9fbb3b4f4a649964b91a794edd903abd7c705 /source/blender/blenkernel | |
parent | 3c09e4d8ccc805fde07565bab620e7295e8ba2ac (diff) |
Fix crash in local collections with excluded layer
Steps to reproduce were:
* Add a new collection
* Put an object into it
* Exclude the selection (the checkbox in front of the name)
* Enable "Local Collections" in any viewport
-> Crash
Did not skip the excluded collections, causing an unsuccessful object
lookup (returned null-pointer).
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/layer.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/layer.c b/source/blender/blenkernel/intern/layer.c index 4198e6ded9c..a05762ba75b 100644 --- a/source/blender/blenkernel/intern/layer.c +++ b/source/blender/blenkernel/intern/layer.c @@ -1132,7 +1132,9 @@ static void layer_collection_local_sync(ViewLayer *view_layer, } LISTBASE_FOREACH (LayerCollection *, child, &layer_collection->layer_collections) { - layer_collection_local_sync(view_layer, child, local_collections_uuid, visible); + if ((child->flag & LAYER_COLLECTION_EXCLUDE) == 0) { + layer_collection_local_sync(view_layer, child, local_collections_uuid, visible); + } } } |