From 24bc47b1795d704cfe1b4a116657e9223f58fffc Mon Sep 17 00:00:00 2001 From: Hein-Pieter van Braam Date: Tue, 22 Aug 2017 02:35:04 +0200 Subject: [PATCH] Add null check to ScriptEditor get_current_tab_control() call This fixes #10517 --- editor/plugins/script_editor_plugin.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index 6db732ba5dc..387337bf2c6 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -2072,7 +2072,10 @@ void ScriptEditor::_update_selected_editor_menu() { } } - EditorHelp *eh = tab_container->get_current_tab_control()->cast_to(); + EditorHelp *eh = NULL; + if (tab_container->get_current_tab_control()) + eh = tab_container->get_current_tab_control()->cast_to(); + if (eh) { script_search_menu->show(); } else {