Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <bastien@blender.org>2021-05-31 11:20:23 +0300
committerBastien Montagne <bastien@blender.org>2021-05-31 11:20:23 +0300
commit421c0b45e5015547e98112016bc550da5296e334 (patch)
tree4cbe11d06aa287f32dc59cabfdcfacf3054a34a4
parent5f749a03ca1d34296adc84fc251e15790f583021 (diff)
Fix (studio-reported) crash in collection management code.
Code checking for potential collection loop dependencies can be called in cases where we cannot guarantee that there is no NULL pointers, so we need to check those. Was already done for objects.
-rw-r--r--source/blender/blenkernel/intern/collection.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/collection.c b/source/blender/blenkernel/intern/collection.c
index d8fbdf26d93..be827cd338d 100644
--- a/source/blender/blenkernel/intern/collection.c
+++ b/source/blender/blenkernel/intern/collection.c
@@ -1423,7 +1423,8 @@ static bool collection_instance_find_recursive(Collection *collection,
}
LISTBASE_FOREACH (CollectionChild *, collection_child, &collection->children) {
- if (collection_instance_find_recursive(collection_child->collection, instance_collection)) {
+ if (collection_child->collection != NULL &&
+ collection_instance_find_recursive(collection_child->collection, instance_collection)) {
return true;
}
}