Merge pull request #79000 from AThousandShips/owner_error

Improve error message for `Node.set_owner`
This commit is contained in:
Rémi Verschelde
2023-07-11 11:29:30 +02:00
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);