From 4a25fe3adcc00aa8d5c193838534009d250c97ca Mon Sep 17 00:00:00 2001 From: James Turner Date: Mon, 22 Nov 2010 23:28:12 +0000 Subject: [PATCH] Ignore -psn_ argument if launched as a GUI app on Mac. --- src/Main/options.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Main/options.cxx b/src/Main/options.cxx index 1b5d7325b..5604e2f98 100644 --- a/src/Main/options.cxx +++ b/src/Main/options.cxx @@ -1552,6 +1552,10 @@ parse_option (const string& arg) SG_LOG( SG_GENERAL, SG_ALERT, "Bad property assignment: " << arg ); return FG_OPTIONS_ERROR; } + } else if ( arg.find("-psn_") == 0) { + // on Mac, when launched from the GUI, we are passed the ProcessSerialNumber + // as an argument (and no others). Silently ignore the argument here. + return FG_OPTIONS_OK; } else if ( arg.find( "--" ) == 0 ) { size_t pos = arg.find( '=' ); string arg_name, arg_value;