mirror of
https://github.com/godotengine/godot.git
synced 2024-12-27 11:24:59 +08:00
Checking path variable if empty before opening external editor to fix #71528
This commit is contained in:
parent
0ddd9c3e8f
commit
85aa03baaf
@ -2256,11 +2256,14 @@ bool ScriptEditor::edit(const Ref<Resource> &p_resource, int p_line, int p_col,
|
||||
args.push_back(script_path);
|
||||
}
|
||||
|
||||
Error err = OS::get_singleton()->create_process(path, args);
|
||||
if (err == OK) {
|
||||
return false;
|
||||
if (!path.is_empty()) {
|
||||
Error err = OS::get_singleton()->create_process(path, args);
|
||||
if (err == OK) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
WARN_PRINT("Couldn't open external text editor, using internal");
|
||||
|
||||
ERR_PRINT("Couldn't open external text editor, falling back to the internal editor. Review your `text_editor/external/` editor settings.");
|
||||
}
|
||||
|
||||
for (int i = 0; i < tab_container->get_tab_count(); i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user