@@ -3548,13 +3548,16 @@ int Main::start() {
3548
3548
gdscript_docs_path = E->next ()->get ();
3549
3549
#endif
3550
3550
} else if (E->get () == " --export-release" ) {
3551
+ ERR_FAIL_COND_V_MSG (!editor && !found_project, EXIT_FAILURE, " Please provide a valid project path when exporting, aborting." );
3551
3552
editor = true ; // needs editor
3552
3553
_export_preset = E->next ()->get ();
3553
3554
} else if (E->get () == " --export-debug" ) {
3555
+ ERR_FAIL_COND_V_MSG (!editor && !found_project, EXIT_FAILURE, " Please provide a valid project path when exporting, aborting." );
3554
3556
editor = true ; // needs editor
3555
3557
_export_preset = E->next ()->get ();
3556
3558
export_debug = true ;
3557
3559
} else if (E->get () == " --export-pack" ) {
3560
+ ERR_FAIL_COND_V_MSG (!editor && !found_project, EXIT_FAILURE, " Please provide a valid project path when exporting, aborting." );
3558
3561
editor = true ;
3559
3562
_export_preset = E->next ()->get ();
3560
3563
export_pack_only = true ;
@@ -3566,6 +3569,8 @@ int Main::start() {
3566
3569
if (parsed_pair) {
3567
3570
E = E->next ();
3568
3571
}
3572
+ } else if (E->get ().begins_with (" --export-" )) {
3573
+ ERR_FAIL_V_MSG (EXIT_FAILURE, " Missing export preset name, aborting." );
3569
3574
}
3570
3575
#ifdef TOOLS_ENABLED
3571
3576
// Handle case where no path is given to --doctool.
@@ -4409,7 +4414,7 @@ bool Main::iteration() {
4409
4414
}
4410
4415
4411
4416
#ifdef TOOLS_ENABLED
4412
- if (wait_for_import && EditorFileSystem::get_singleton ()->doing_first_scan ()) {
4417
+ if (wait_for_import && EditorFileSystem::get_singleton () && EditorFileSystem::get_singleton () ->doing_first_scan ()) {
4413
4418
exit = false ;
4414
4419
}
4415
4420
#endif
0 commit comments