From 9be91123929a8bf652ca41e77c54ceacdc74d61a Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Tue, 5 Nov 2019 19:50:41 +0100 Subject: [PATCH] fixing @available warning --- src/osx/cocoa/utils_base.mm | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/osx/cocoa/utils_base.mm b/src/osx/cocoa/utils_base.mm index aac83ba21a..e84c49c6c3 100644 --- a/src/osx/cocoa/utils_base.mm +++ b/src/osx/cocoa/utils_base.mm @@ -287,14 +287,16 @@ bool wxCocoaLaunch(const char* const* argv, pid_t &pid) NSRunningApplication *app = nil; #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_10 - if ( WX_IS_MACOS_AVAILABLE(10, 10) && [params count] > 0 ) + if ( WX_IS_MACOS_AVAILABLE(10, 10) ) { - app = [ws openURLs:params withApplicationAtURL:url - options:NSWorkspaceLaunchAsync - configuration:[NSDictionary dictionary] - error:&error]; + if ( [params count] > 0 ) + app = [ws openURLs:params withApplicationAtURL:url + options:NSWorkspaceLaunchAsync + configuration:[NSDictionary dictionary] + error:&error]; } - else + + if ( app == nil ) #endif { app = [ws launchApplicationAtURL:url