Improve error message for Node.set_owner

This commit is contained in:
Ninni Pipping 2023-07-03 22:19:24 +02:00
parent cdd2313ba2
commit 0183340012
2 changed files with 3 additions and 3 deletions

View file

@ -1906,7 +1906,7 @@ void Node::set_owner(Node *p_owner) {
check = check->data.parent;
}
ERR_FAIL_COND(!owner_valid);
ERR_FAIL_COND_MSG(!owner_valid, "Invalid owner. Owner must be an ancestor in the tree.");
_set_owner_nocheck(p_owner);