[Bf-blender-cvs] [50dd876fbf6] master: Fix T75629: Disallow dragging collection instance into itself
Vincent Blankfield
noreply at git.blender.org
Tue Apr 14 15:14:19 CEST 2020
Commit: 50dd876fbf63de3a9bc109c0512a18fd7418235e
Author: Vincent Blankfield
Date: Tue Apr 14 15:10:42 2020 +0200
Branches: master
https://developer.blender.org/rB50dd876fbf63de3a9bc109c0512a18fd7418235e
Fix T75629: Disallow dragging collection instance into itself
Differential Revision: https://developer.blender.org/D7408
===================================================================
M source/blender/blenkernel/intern/collection.c
===================================================================
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;
}
}
More information about the Bf-blender-cvs
mailing list