From cb86f6fbf61263e0cfe73313de595b8e3ffd4bdb Mon Sep 17 00:00:00 2001 From: Omar Al Halabi Date: Sun, 19 Nov 2017 10:39:31 +0200 Subject: [PATCH] fix set_current_tab: Indexp_current=-1 out of size --- editor/plugins/script_editor_plugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index 607ccaa4e7a..85416a57009 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -1583,7 +1583,7 @@ void ScriptEditor::_update_script_names() { } } - if (_sort_list_on_update) { + if (_sort_list_on_update && !sedata.empty()) { sedata.sort(); // change actual order of tab_container so that the order can be rearranged by user