Fix crash due to missing retain in wxUILocale wxMac code
We need to retain [NSLocale availableLocaleIdentifiers] result too, as it doesn't copy the returned object.
This commit is contained in:
@@ -86,7 +86,7 @@ public:
|
|||||||
// completely invalid strings, so we need to check if the name is
|
// completely invalid strings, so we need to check if the name is
|
||||||
// actually in the list of the supported locales ourselves.
|
// actually in the list of the supported locales ourselves.
|
||||||
static wxCFRef<CFArrayRef>
|
static wxCFRef<CFArrayRef>
|
||||||
all((CFArrayRef)[NSLocale availableLocaleIdentifiers]);
|
all((CFArrayRef)[[NSLocale availableLocaleIdentifiers] retain]);
|
||||||
|
|
||||||
wxCFStringRef cfName(locId.GetName());
|
wxCFStringRef cfName(locId.GetName());
|
||||||
if ( ![(NSArray*)all.get() containsObject: cfName.AsNSString()] )
|
if ( ![(NSArray*)all.get() containsObject: cfName.AsNSString()] )
|
||||||
|
Reference in New Issue
Block a user