Fix crash when loading scene instance after node vanished from parent
This commit is contained in:
parent
eb98fd9442
commit
78ffc2a987
1 changed files with 6 additions and 6 deletions
|
@ -315,7 +315,6 @@ Node *SceneState::instantiate(GenEditState p_edit_state) const {
|
||||||
node->_set_owner_nocheck(owner);
|
node->_set_owner_nocheck(owner);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// we only want to deal with pinned flag if instancing as pure main (no instance, no inheriting)
|
// 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) {
|
if (p_edit_state == GEN_EDIT_STATE_MAIN) {
|
||||||
|
@ -323,6 +322,7 @@ Node *SceneState::instantiate(GenEditState p_edit_state) const {
|
||||||
} else {
|
} else {
|
||||||
node->remove_meta("_edit_pinned_properties_");
|
node->remove_meta("_edit_pinned_properties_");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ret_nodes[i] = node;
|
ret_nodes[i] = node;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue