diff --git a/main/main.cpp b/main/main.cpp index b08fa12f9f..27fd0420ab 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -286,6 +286,14 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph #endif while (I) { +#ifdef OSX_ENABLED + // Ignore the process serial number argument passed by macOS Gatekeeper. + // Otherwise, Godot would try to open a non-existent project on the first start and abort. + if (I->get().begins_with("-psn_")) { + I = I->next(); + continue; + } +#endif List::Element *N = I->next();