Merge pull request #16726 from Paulb23/p_child_index_issue_12189

Fixed members overview Index p_index out of size (2.1), issue 12189
This commit is contained in:
Rémi Verschelde 2018-02-15 20:54:48 +01:00 committed by GitHub
commit d452f46a38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 0 deletions

View File

@ -2001,6 +2001,11 @@ struct _ScriptEditorItemData {
};
void ScriptEditor::_update_members_overview_visibility() {
int selected = tab_container->get_current_tab();
if (selected < 0 || selected >= tab_container->get_child_count()) {
return;
}
if (members_overview_enabled) {
members_overview->set_hidden(false);
} else {
@ -2011,6 +2016,11 @@ void ScriptEditor::_update_members_overview_visibility() {
void ScriptEditor::_update_members_overview() {
members_overview->clear();
int selected = tab_container->get_current_tab();
if (selected < 0 || selected >= tab_container->get_child_count()) {
return;
}
if (tab_container->get_child_count() <= 0)
return;