|
@@ -649,7 +649,9 @@ void EditorData::remove_scene(int p_idx) {
|
|
|
EditorNode::get_singleton()->emit_signal("scene_closed", edited_scene[p_idx].path);
|
|
|
}
|
|
|
|
|
|
- undo_redo_manager->discard_history(edited_scene[p_idx].history_id);
|
|
|
+ if (undo_redo_manager->has_history(edited_scene[p_idx].history_id)) { // Might not exist if scene failed to load.
|
|
|
+ undo_redo_manager->discard_history(edited_scene[p_idx].history_id);
|
|
|
+ }
|
|
|
edited_scene.remove_at(p_idx);
|
|
|
}
|
|
|
|