summaryrefslogtreecommitdiff
path: root/main/main.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-02-14 16:25:18 +0100
committerGitHub <noreply@github.com>2018-02-14 16:25:18 +0100
commit583d6f2682ce3eb9915e677206e89337dfed8b07 (patch)
tree337a7dc33e4033565efd986d1bf1acfa1891d144 /main/main.cpp
parentc5a5b10342e4f7788964be947854f5754a82b5ca (diff)
parent3f8a4cc7193e964f716fde2cd28a946669e2d8d6 (diff)
Merge pull request #15741 from paulloz/bug-no-main-scene
Fix bug when launching a game with no main scene
Diffstat (limited to 'main/main.cpp')
-rw-r--r--main/main.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/main/main.cpp b/main/main.cpp
index ea9e75176b..62d218477f 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -748,6 +748,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);