Fix crash when loading scene instance after node vanished from parent
(cherry picked from commit 78ffc2a987
)
This commit is contained in:
parent
45088780be
commit
0ebbc5b07c
|
@ -313,13 +313,13 @@ Node *SceneState::instance(GenEditState p_edit_state) const {
|
|||
node->_set_owner_nocheck(owner);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// we only want to deal with pinned flag if instancing as pure main (no instance, no inheriting)
|
||||
if (p_edit_state == GEN_EDIT_STATE_MAIN) {
|
||||
_sanitize_node_pinned_properties(node);
|
||||
} else {
|
||||
node->remove_meta("_edit_pinned_properties_");
|
||||
// we only want to deal with pinned flag if instancing as pure main (no instance, no inheriting)
|
||||
if (p_edit_state == GEN_EDIT_STATE_MAIN) {
|
||||
_sanitize_node_pinned_properties(node);
|
||||
} else {
|
||||
node->remove_meta("_edit_pinned_properties_");
|
||||
}
|
||||
}
|
||||
|
||||
ret_nodes[i] = node;
|
||||
|
|
Loading…
Reference in New Issue