From 648313ab8a7364ce9429108b22d31cd22e555bc3 Mon Sep 17 00:00:00 2001 From: Kanabenki Date: Wed, 31 Jul 2019 23:49:16 +0200 Subject: [PATCH] Don't add unsaved scene to previous scenes list --- editor/editor_node.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 2cbe408828b..faa936bd647 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -2640,7 +2640,9 @@ void EditorNode::_discard_changes(const String &p_str) { Node *scene = editor_data.get_edited_scene_root(tab_closing); if (scene != NULL) { String scene_filename = scene->get_filename(); - previous_scenes.push_back(scene_filename); + if (scene_filename != "") { + previous_scenes.push_back(scene_filename); + } } _remove_scene(tab_closing);