summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--editor/plugins/script_editor_plugin.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index 6db732ba5d..387337bf2c 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>();
+ EditorHelp *eh = NULL;
+ if (tab_container->get_current_tab_control())
+ eh = tab_container->get_current_tab_control()->cast_to<EditorHelp>();
+
if (eh) {
script_search_menu->show();
} else {