Merge pull request #14977 from volzhs/fix-crash-group

Fix crash & error at saving scene
This commit is contained in:
Juan Linietsky 2017-12-26 11:43:02 -03:00 committed by GitHub
commit 02e883713a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -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();

View File

@ -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--;