Godot Engine – Multi-platform 2D and 3D game engine
Fix crash when closing all script editor tabs
mattigu5390428412b6
diff --git a/editor/script/script_editor_plugin.cpp b/editor/script/script_editor_plugin.cppindex 7ac8d649c9b..caad2e9da2d 100644--- a/editor/script/script_editor_plugin.cpp+++ b/editor/script/script_editor_plugin.cpp@@ -3629,7 +3629,7 @@ void ScriptEditor::_history_back() {void ScriptEditor::_roll_back_to_pre_tab() {Control *tselected = tab_container->get_current_tab_control();- if (history[history_pos].control != tselected) {+ if (history_pos == -1 || history[history_pos].control != tselected) {return;}