summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Marques <george@gmarqu.es>2017-11-19 13:32:22 -0200
committerGitHub <noreply@github.com>2017-11-19 13:32:22 -0200
commit3b596cdbe046c4a4ed0cca51c5cd961e4c7dfeea (patch)
treef4677dcf9f1c104f99c02b79d8e20c6221728ea4
parent992a40a50dc886ba29a907360374b18f1cbeaebb (diff)
parentcb86f6fbf61263e0cfe73313de595b8e3ffd4bdb (diff)
Merge pull request #13024 from omar25h/set_current_tab_fix
fix set_current_tab: Indexp_current=-1 out of size
-rw-r--r--editor/plugins/script_editor_plugin.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index 607ccaa4e7..85416a5700 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