diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-10-05 13:38:12 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-10-05 13:38:12 +0200 |
commit | b4157cd6ac0dc24dede57ef555854662b56553a6 (patch) | |
tree | 7534244f232d124d494b2a20216a1ec1198f9aff | |
parent | 82d9ade7c38c5948ef19ba4b1470ceeb5a50984c (diff) | |
parent | 5f8293db54efb24051b32c16700ac05349c05cb9 (diff) |
Merge pull request #65857 from MinusKube/inherited-open-crash
Prevent unsaved inherited scenes from being detected as the 'placeholder' scene
-rw-r--r-- | editor/editor_node.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 913f70c442..34c0c35b12 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -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--; } |