diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-01-10 10:03:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-10 10:03:44 +0100 |
commit | 9a81b36da147230995fc3f8fdd467d2d16fb456a (patch) | |
tree | 165db6c787e2c00b8f172b880345ecc5901fdf24 | |
parent | 65446a1303a519035afffde3fc278bb50d2a70d8 (diff) | |
parent | 5377f062d45190680b85cc4a3e54d8d997ff415d (diff) |
Merge pull request #34982 from akien-mga/main-prevent-pm-in-editor
Main: Prevent Project Manager-ception in editor
-rw-r--r-- | main/main.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/main/main.cpp b/main/main.cpp index c29a5a0aa6..747ea08ec9 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -815,6 +815,13 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph I = N; } +#ifdef TOOLS_ENABLED + if (editor && project_manager) { + OS::get_singleton()->print("Error: Command line arguments implied opening both editor and project manager, which is not possible. Aborting.\n"); + goto error; + } +#endif + // Network file system needs to be configured before globals, since globals are based on the // 'project.godot' file which will only be available through the network if this is enabled FileAccessNetwork::configure(); @@ -930,7 +937,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph } } - if (!project_manager) { + if (!project_manager && !editor) { // Determine if the project manager should be requested project_manager = main_args.size() == 0 && !found_project; } |