summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
Diffstat (limited to 'scene')
-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);