Fix p_index out of size error when closing script

This commit is contained in:
volzhs 2016-10-31 06:20:54 +09:00
parent 2001e0f75f
commit 707185d9d8

View file

@ -945,7 +945,7 @@ void ScriptEditor::_menu_option(int p_option) {
}
}
EditorHelp *help = tab_container->get_child(selected)->cast_to<EditorHelp>();
EditorHelp *help = tab_container->get_current_tab_control()->cast_to<EditorHelp>();
if (help) {
switch(p_option) {