diff --git a/retroarch.c b/retroarch.c index 648bbdc38f..2a5d4b7595 100644 --- a/retroarch.c +++ b/retroarch.c @@ -714,7 +714,10 @@ static void parse_input(int argc, char *argv[]) for (;;) { int port; - int c = getopt_long(argc, argv, optstring, opts, NULL); + int c = -1; + + if (argv != NULL) + c = getopt_long(argc, argv, optstring, opts, NULL); if (c == -1) break;