aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Joannon2018-01-15 01:04:33 +0100
committerHein-Pieter van Braam2018-02-19 20:56:54 +0100
commit71607d91985f59e45d93202b20d56c47f7fe0f38 (patch)
tree5d166005c3400ebf55737766b740704179ac6ed7
parent3548f71cc4006fb08858390487495f240ece0cc1 (diff)
downloadgodot-71607d91985f59e45d93202b20d56c47f7fe0f38.tar.gz
godot-71607d91985f59e45d93202b20d56c47f7fe0f38.tar.zst
godot-71607d91985f59e45d93202b20d56c47f7fe0f38.zip
Fix bug when launching a game with no main scene
Check for a main scene after loading project settings and exit if there's none (except if launching in editor mode). (cherry picked from commit 3f8a4cc7193e964f716fde2cd28a946669e2d8d6)
-rw-r--r--main/main.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/main/main.cpp b/main/main.cpp
index f6a839144..d476672f0 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -744,6 +744,15 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
goto error;
#endif
+ } else if (String(GLOBAL_DEF("application/run/main_scene", "")) == "") {
+#ifdef TOOLS_ENABLED
+ if (!editor) {
+#endif
+ OS::get_singleton()->print("Error: Can't run project: no main scene defined.\n");
+ goto error;
+#ifdef TOOLS_ENABLED
+ }
+#endif
}
GLOBAL_DEF("logging/file_logging/enable_file_logging", false);