Fix crash when loading scene instance after node vanished from parent

(cherry picked from commit 78ffc2a987)
This commit is contained in:
Pedro J. Estébanez 2021-11-17 14:00:23 +01:00 committed by Rémi Verschelde
parent 45088780be
commit 0ebbc5b07c
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 6 additions and 6 deletions

View File

@ -313,7 +313,6 @@ 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) {
@ -321,6 +320,7 @@ Node *SceneState::instance(GenEditState p_edit_state) const {
} else {
node->remove_meta("_edit_pinned_properties_");
}
}
ret_nodes[i] = node;