You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-27 15:57:02 +00:00
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 3f8a4cc719)
This commit is contained in:
committed by
Hein-Pieter van Braam
parent
3548f71cc4
commit
71607d9198
@@ -743,6 +743,15 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
|
||||
OS::get_singleton()->print("Error: Could not load game path '%s'.\n", game_path.ascii().get_data());
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user