summaryrefslogtreecommitdiff
path: root/scene/main/node.cpp
diff options
context:
space:
mode:
authorvolzhs <volzhs@gmail.com>2017-12-23 20:16:27 +0900
committervolzhs <volzhs@gmail.com>2017-12-25 01:31:13 +0900
commitd6a88cdc4134c5938bc8c6a291d6f087ad75da07 (patch)
treeee56c07313e7db6cdbb8569dcf0343f2a3dc323a /scene/main/node.cpp
parent3068ccc8e69aad68c860ce8688bdc6d41107be1b (diff)
Fix crash from move_child at saving scene
Diffstat (limited to 'scene/main/node.cpp')
-rw-r--r--scene/main/node.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/scene/main/node.cpp b/scene/main/node.cpp
index de1ab9959a..942a6d5428 100644
--- a/scene/main/node.cpp
+++ b/scene/main/node.cpp
@@ -340,7 +340,8 @@ void Node::move_child(Node *p_child, int p_pos) {
data.children[i]->notification(NOTIFICATION_MOVED_IN_PARENT);
}
for (const Map<StringName, GroupData>::Element *E = p_child->data.grouped.front(); E; E = E->next()) {
- E->get().group->changed = true;
+ if (E->get().group)
+ E->get().group->changed = true;
}
data.blocked--;