diff --git a/libs/kiplatform/osx/environment.mm b/libs/kiplatform/osx/environment.mm index e6bc5967e4..4a3bc77986 100644 --- a/libs/kiplatform/osx/environment.mm +++ b/libs/kiplatform/osx/environment.mm @@ -47,7 +47,16 @@ bool KIPLATFORM::ENV::MoveToTrash( const wxString& aPath, wxString& aError ) if( result == NO ) { NSString* errmsg; - errmsg = [err.localizedFailureReason stringByAppendingFormat:@"\n\n%@", err.localizedRecoverySuggestion]; + + if( err.localizedRecoverySuggestion == nil ) + { + errmsg = err.localizedFailureReason; + } + else + { + errmsg = [err.localizedFailureReason stringByAppendingFormat:@"\n\n%@", err.localizedRecoverySuggestion]; + } + aError = wxCFStringRef::AsString( (CFStringRef) errmsg ); return false; }