summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-08-22 08:08:42 +0200
committerGitHub <noreply@github.com>2017-08-22 08:08:42 +0200
commitdd07a15fc61123644793542eda52b620b7ebc3a7 (patch)
tree1b54cc5b960eeb5fa46c54ccb9c876ad039f5154 /editor
parent733125b7a5c424efda7a995263282f42b89ddbb8 (diff)
parent24bc47b1795d704cfe1b4a116657e9223f58fffc (diff)
Merge pull request #10527 from hpvb/fix-10517
Add null check to ScriptEditor get_current_tab_control() call
Diffstat (limited to 'editor')
-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 {