aboutsummaryrefslogtreecommitdiff
path: root/editor/plugins/script_editor_plugin.cpp
diff options
context:
space:
mode:
authorRémi Verschelde2017-08-22 08:08:42 +0200
committerGitHub2017-08-22 08:08:42 +0200
commitdd07a15fc61123644793542eda52b620b7ebc3a7 (patch)
tree1b54cc5b960eeb5fa46c54ccb9c876ad039f5154 /editor/plugins/script_editor_plugin.cpp
parent733125b7a5c424efda7a995263282f42b89ddbb8 (diff)
parent24bc47b1795d704cfe1b4a116657e9223f58fffc (diff)
downloadgodot-dd07a15fc61123644793542eda52b620b7ebc3a7.tar.gz
godot-dd07a15fc61123644793542eda52b620b7ebc3a7.tar.zst
godot-dd07a15fc61123644793542eda52b620b7ebc3a7.zip
Merge pull request #10527 from hpvb/fix-10517
Add null check to ScriptEditor get_current_tab_control() call
Diffstat (limited to 'editor/plugins/script_editor_plugin.cpp')
-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 6db732ba5..387337bf2 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 {