summaryrefslogtreecommitdiff
path: root/editor/plugins
diff options
context:
space:
mode:
authorChristoh Prenissl <chris@celrage.com>2023-01-16 22:32:23 +0100
committerChristoph Prenissl <snakept@icloud.com>2023-01-17 15:07:15 +0100
commit85aa03baaf179707fabbb3e7fa07a989f5535c23 (patch)
tree86e2e49eebbc7f0b24a905ed0a55e4cf4f5d4384 /editor/plugins
parent0ddd9c3e8f9088fa139e25b2903289d727073e12 (diff)
Checking path variable if empty before opening external editor to fix #71528
Diffstat (limited to 'editor/plugins')
-rw-r--r--editor/plugins/script_editor_plugin.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index 4268abe4a2..8777b73540 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -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++) {