Merge pull request #65857 from MinusKube/inherited-open-crash

Prevent unsaved inherited scenes from being detected as the 'placeholder' scene
This commit is contained in:
Rémi Verschelde 2022-10-05 13:38:12 +02:00
commit b4157cd6ac

View File

@ -3772,7 +3772,7 @@ int EditorNode::new_scene() {
if (editor_data.get_edited_scene_count() > 1) {
for (int i = 0; i < editor_data.get_edited_scene_count() - 1; i++) {
bool unsaved = get_undo_redo()->is_history_unsaved(editor_data.get_scene_history_id(i));
if (!unsaved && editor_data.get_scene_path(i).is_empty()) {
if (!unsaved && editor_data.get_scene_path(i).is_empty() && editor_data.get_edited_scene_root(i) == nullptr) {
editor_data.remove_scene(i);
idx--;
}