summaryrefslogtreecommitdiff
path: root/tools/editor/plugins
diff options
context:
space:
mode:
authorneikeq <ignalfonsore@gmail.com>2015-11-24 22:59:44 +0100
committerneikeq <ignalfonsore@gmail.com>2015-11-24 23:03:51 +0100
commit660e831e3669f3dff120233549d963b49bf4d76b (patch)
tree27592d6ad484d0dbaea1e3b87441efd62cec09d2 /tools/editor/plugins
parentc731dd1ba68604ff7e97915e2b9d3011e818ca03 (diff)
Fix Class Search dialog not showing up
Diffstat (limited to 'tools/editor/plugins')
-rw-r--r--tools/editor/plugins/script_editor_plugin.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/tools/editor/plugins/script_editor_plugin.cpp b/tools/editor/plugins/script_editor_plugin.cpp
index 65ed420a51..34d0ec2a4b 100644
--- a/tools/editor/plugins/script_editor_plugin.cpp
+++ b/tools/editor/plugins/script_editor_plugin.cpp
@@ -885,14 +885,13 @@ void ScriptEditor::_menu_option(int p_option) {
} break;
case SEARCH_CLASSES: {
- if (tab_container->get_tab_count()==0)
- break;
-
String current;
- EditorHelp *eh = tab_container->get_child( tab_container->get_current_tab() )->cast_to<EditorHelp>();
- if (eh) {
- current=eh->get_class_name();
+ if (tab_container->get_tab_count()>0) {
+ EditorHelp *eh = tab_container->get_child( tab_container->get_current_tab() )->cast_to<EditorHelp>();
+ if (eh) {
+ current=eh->get_class_name();
+ }
}
help_index->popup_centered_ratio(0.6);