Merge pull request #8037 from RandomShaper/remove-warning

Remove warning on owner re-assignment
This commit is contained in:
Rémi Verschelde 2017-03-18 10:49:06 +01:00 committed by GitHub
commit 14c01dfea7

View file

@ -1719,6 +1719,9 @@ void Node::get_owned_by(Node *p_by, List<Node *> *p_owned) {
void Node::_set_owner_nocheck(Node *p_owner) {
if (data.owner == p_owner)
return;
ERR_FAIL_COND(data.owner);
data.owner = p_owner;
data.owner->data.owned.push_back(this);