summaryrefslogtreecommitdiff
path: root/src/os
diff options
context:
space:
mode:
authorMichael Lutz <michi@icosahedron.de>2019-09-29 13:45:47 +0200
committerMichael Lutz <michi@icosahedron.de>2019-09-29 20:31:48 +0200
commit61d6fa97cce2769fe8867e4fbf0de14ab42fd633 (patch)
tree9e705bda2cc5b9aa138bd9574bf382e9c84f5c8f /src/os
parentceb29cef851064598eb4417b7d280b4f24295b0b (diff)
downloadopenttd-61d6fa97cce2769fe8867e4fbf0de14ab42fd633.tar.xz
Fix: [OSX] Wrong allocator usage for creating a CFString.
Diffstat (limited to 'src/os')
-rw-r--r--src/os/macosx/string_osx.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/os/macosx/string_osx.cpp b/src/os/macosx/string_osx.cpp
index 4c33d5497..6e5916e7c 100644
--- a/src/os/macosx/string_osx.cpp
+++ b/src/os/macosx/string_osx.cpp
@@ -284,7 +284,7 @@ void MacOSSetCurrentLocaleName(const char *iso_code)
if (_osx_locale != nullptr) CFRelease(_osx_locale);
- CFStringRef iso = CFStringCreateWithCString(kCFAllocatorNull, iso_code, kCFStringEncodingUTF8);
+ CFStringRef iso = CFStringCreateWithCString(kCFAllocatorDefault, iso_code, kCFStringEncodingUTF8);
_osx_locale = CFLocaleCreate(kCFAllocatorDefault, iso);
CFRelease(iso);
}