summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2021-11-17 15:54:38 +0100
committerGitHub <noreply@github.com>2021-11-17 15:54:38 +0100
commit0ef092a138cab6e79ae994b3f0f94173ee8b8faa (patch)
treea1051a3441512a201d7c8a6a16a80b7c4c784b42
parentf9b4547abd4100bed868243779a7ab0ba84f4a5e (diff)
parent78ffc2a987ed672c7fd9d2fa9f3e74ee047f917f (diff)
Merge pull request #55056 from RandomShaper/fix_crash_instantiate
-rw-r--r--scene/resources/packed_scene.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp
index f43715a463..3f4765d20f 100644
--- a/scene/resources/packed_scene.cpp
+++ b/scene/resources/packed_scene.cpp
@@ -315,13 +315,13 @@ Node *SceneState::instantiate(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;