summaryrefslogtreecommitdiff
path: root/scene/main
diff options
context:
space:
mode:
authorPedro J. Estébanez <pedrojrulez@gmail.com>2017-03-15 12:28:57 +0100
committerPedro J. Estébanez <pedrojrulez@gmail.com>2017-03-15 12:28:57 +0100
commite3b4b7fa982fa58cf999a2c7cde3eacb1ba94add (patch)
treebf07076c2a50d20a67cf65eb2699705259bea133 /scene/main
parent52ddd9ac9cf4074e6461a236808313002b0d83c4 (diff)
Remove warning on owner re-assignment
Diffstat (limited to 'scene/main')
-rw-r--r--scene/main/node.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/scene/main/node.cpp b/scene/main/node.cpp
index 0245944154..a59f3c3823 100644
--- a/scene/main/node.cpp
+++ b/scene/main/node.cpp
@@ -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);