diff options
author | Fredia Huya-Kouadio <fhuyakou@gmail.com> | 2022-09-07 14:21:34 -0700 |
---|---|---|
committer | Fredia Huya-Kouadio <fhuyakou@gmail.com> | 2022-09-07 14:21:34 -0700 |
commit | cd544fd86b0aca99bf31e6f0e3a248d3e4195d49 (patch) | |
tree | d0d631b5c0cb530fa3c627697148aed3f50ec685 /editor/editor_node.cpp | |
parent | 337e4d185af0ff0ea2dba60abecd4af50b9d10f8 (diff) |
Fix issue causing the project manager to crash because of missing path argument
In the process, the initialization logic is updated to show an error message and gracefully close the engine when setup errors occur.
Diffstat (limited to 'editor/editor_node.cpp')
-rw-r--r-- | editor/editor_node.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index a2231f4601..6b5e982067 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -3256,8 +3256,12 @@ void EditorNode::_discard_changes(const String &p_str) { for (const String &a : Main::get_forwardable_cli_arguments(Main::CLI_SCOPE_TOOL)) { args.push_back(a); } - args.push_back("--path"); - args.push_back(exec.get_base_dir()); + + String exec_base_dir = exec.get_base_dir(); + if (!exec_base_dir.is_empty()) { + args.push_back("--path"); + args.push_back(exec_base_dir); + } args.push_back("--project-manager"); Error err = OS::get_singleton()->create_instance(args); |