From d6a88cdc4134c5938bc8c6a291d6f087ad75da07 Mon Sep 17 00:00:00 2001 From: volzhs Date: Sat, 23 Dec 2017 20:16:27 +0900 Subject: [PATCH 1/2] Fix crash from move_child at saving scene --- scene/main/node.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scene/main/node.cpp b/scene/main/node.cpp index de1ab9959aa..942a6d5428b 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::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--; From ff68b80df7e08a2fcae3b3ace56be1d9bee73235 Mon Sep 17 00:00:00 2001 From: volzhs Date: Mon, 25 Dec 2017 01:31:28 +0900 Subject: [PATCH 2/2] Fix error if scene has Camera at saving scene --- scene/3d/camera.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scene/3d/camera.cpp b/scene/3d/camera.cpp index 72c0b979afe..bd71c2fc186 100644 --- a/scene/3d/camera.cpp +++ b/scene/3d/camera.cpp @@ -70,6 +70,9 @@ void Camera::_validate_property(PropertyInfo &p_property) const { void Camera::_update_camera() { + if (!is_inside_tree()) + return; + Transform tr = get_camera_transform(); tr.origin += tr.basis.get_axis(1) * v_offset; tr.origin += tr.basis.get_axis(0) * h_offset; @@ -81,7 +84,7 @@ void Camera::_update_camera() { get_viewport()->_camera_transform_changed_notify(); */ - if (!is_inside_tree() || get_tree()->is_node_being_edited(this) || !is_current()) + if (get_tree()->is_node_being_edited(this) || !is_current()) return; get_viewport()->_camera_transform_changed_notify();