From 707185d9d8a273c1bf2a70dcba707045295427a9 Mon Sep 17 00:00:00 2001 From: volzhs Date: Mon, 31 Oct 2016 06:20:54 +0900 Subject: [PATCH] Fix p_index out of size error when closing script --- tools/editor/plugins/script_editor_plugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/editor/plugins/script_editor_plugin.cpp b/tools/editor/plugins/script_editor_plugin.cpp index b6ce3e89eb6..e7170a23f39 100644 --- a/tools/editor/plugins/script_editor_plugin.cpp +++ b/tools/editor/plugins/script_editor_plugin.cpp @@ -945,7 +945,7 @@ void ScriptEditor::_menu_option(int p_option) { } } - EditorHelp *help = tab_container->get_child(selected)->cast_to(); + EditorHelp *help = tab_container->get_current_tab_control()->cast_to(); if (help) { switch(p_option) {