Fix T75629: Disallow dragging collection instance into itself
Differential Revision: https://developer.blender.org/D7408
This commit is contained in:
parent
2ed2dd7b13
commit
50dd876fbf
Notes:
blender-bot
2023-02-14 07:39:44 +01:00
Referenced by issue #75629, Stack overflow when a collection instance is a child of the original collection
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue