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
path: root/source
diff options
context:
space:
mode:
authorVincent Blankfield <vvv>2020-04-14 16:10:42 +0300
committerJacques Lucke <jacques@blender.org>2020-04-14 16:12:26 +0300
commit50dd876fbf63de3a9bc109c0512a18fd7418235e (patch)
tree645349f04b6d025fc5d30fc033951c48d3a32ab7 /source
parent2ed2dd7b13a09b1081c8110c245c51bb6b3bac91 (diff)
Fix T75629: Disallow dragging collection instance into itself
Differential Revision: https://developer.blender.org/D7408
Diffstat (limited to 'source')
-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 83a6949430e..583bb39a851 100644
--- a/source/blender/blenkernel/intern/collection.c
+++ b/source/blender/blenkernel/intern/collection.c
@@ -657,7 +657,8 @@ static bool collection_object_add(
{
if (ob->instance_collection) {
/* Cyclic dependency check. */
- if (collection_find_child_recursive(ob->instance_collection, collection)) {
+ if (collection_find_child_recursive(ob->instance_collection, collection) ||
+ ob->instance_collection == collection) {
return false;
}
}