Merge pull request #20456 from Paulb23/issue_20429_fix_right_click_crash
Fix crash on doc right click, issue 20429
This commit is contained in:
commit
cbf85ea743
1 changed files with 7 additions and 7 deletions
|
@ -2407,7 +2407,6 @@ 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) {
|
||||
|
@ -2416,6 +2415,7 @@ void ScriptEditor::_make_script_list_context_menu() {
|
|||
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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue