diff --git a/src/osx/core/uilocale.mm b/src/osx/core/uilocale.mm index 3b76e7a069..307ac5ca38 100644 --- a/src/osx/core/uilocale.mm +++ b/src/osx/core/uilocale.mm @@ -86,7 +86,7 @@ public: // completely invalid strings, so we need to check if the name is // actually in the list of the supported locales ourselves. static wxCFRef - all((CFArrayRef)[NSLocale availableLocaleIdentifiers]); + all((CFArrayRef)[[NSLocale availableLocaleIdentifiers] retain]); wxCFStringRef cfName(locId.GetName()); if ( ![(NSArray*)all.get() containsObject: cfName.AsNSString()] )