summaryrefslogtreecommitdiff
path: root/scene/main/node.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-03-18 10:49:06 +0100
committerGitHub <noreply@github.com>2017-03-18 10:49:06 +0100
commit14c01dfea79af8ad527a0f25c9aedb9c6d2587e8 (patch)
tree49d19a6ee78c65f9cdd4d22155ee73589ee98aa4 /scene/main/node.cpp
parent60bdc3705647e77658144ccf45b9f8a4f0808431 (diff)
parente3b4b7fa982fa58cf999a2c7cde3eacb1ba94add (diff)
Merge pull request #8037 from RandomShaper/remove-warning
Remove warning on owner re-assignment
Diffstat (limited to 'scene/main/node.cpp')
-rwxr-xr-xscene/main/node.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/scene/main/node.cpp b/scene/main/node.cpp
index 600dc8737d..c13ed232a7 100755
--- 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);