diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-07-25 21:01:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-25 21:01:10 +0200 |
commit | cbf85ea74328391c325cfc10908f9e05f26d3540 (patch) | |
tree | 2288c469384e83d9e36302c54a5301d5334d1e5a | |
parent | 19fe78fe6fe2aa3b8a0d8009a5a47d75c3242a92 (diff) | |
parent | 6696b16685b06da1415057da6657cae4694dfb52 (diff) |
Merge pull request #20456 from Paulb23/issue_20429_fix_right_click_crash
Fix crash on doc right click, issue 20429
-rw-r--r-- | editor/plugins/script_editor_plugin.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index a1dc746702..94d1b96b91 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -2407,14 +2407,14 @@ void ScriptEditor::_make_script_list_context_menu() { context_menu->add_separator(); context_menu->add_shortcut(ED_GET_SHORTCUT("script_editor/copy_path"), FILE_COPY_PATH); context_menu->add_shortcut(ED_GET_SHORTCUT("script_editor/show_in_file_system"), SHOW_IN_FILE_SYSTEM); - } - Ref<Script> scr = se->get_edited_resource(); - if (scr != NULL) { - context_menu->add_shortcut(ED_GET_SHORTCUT("script_editor/reload_script_soft"), FILE_TOOL_RELOAD_SOFT); - if (!scr.is_null() && scr->is_tool()) { - context_menu->add_separator(); - context_menu->add_shortcut(ED_GET_SHORTCUT("script_editor/run_file"), FILE_RUN); + Ref<Script> scr = se->get_edited_resource(); + if (scr != NULL) { + context_menu->add_shortcut(ED_GET_SHORTCUT("script_editor/reload_script_soft"), FILE_TOOL_RELOAD_SOFT); + if (!scr.is_null() && scr->is_tool()) { + context_menu->add_separator(); + context_menu->add_shortcut(ED_GET_SHORTCUT("script_editor/run_file"), FILE_RUN); + } } } else { context_menu->add_shortcut(ED_GET_SHORTCUT("script_editor/close_file"), FILE_CLOSE); |