mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-06 06:32:56 +01:00
Guard against null pointer in macos_str_decomp_to_precomp()
This commit is contained in:
committed by
Michael Steenbeek
parent
ab75b8db84
commit
493bb62457
@@ -137,6 +137,10 @@ utf8* macos_str_decomp_to_precomp(utf8 *input)
|
||||
{
|
||||
@autoreleasepool
|
||||
{
|
||||
if (input == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
NSString *inputDecomp = [NSString stringWithUTF8String:input];
|
||||
return strdup([inputDecomp.precomposedStringWithCanonicalMapping cStringUsingEncoding:NSUTF8StringEncoding]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user