Fix #16205, crash on non-Metal build (#16214)

This commit is contained in:
Eric Warmenhoven 2024-02-09 10:31:59 -05:00 committed by GitHub
parent 7b711214a7
commit bc5805e8e6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -110,11 +110,16 @@ bool fill_pathname_application_data(char *s, size_t len)
portable = true; portable = true;
#else #else
CFStringRef key = CFStringCreateWithCString(NULL, "RAPortableInstall", kCFStringEncodingUTF8); CFStringRef key = CFStringCreateWithCString(NULL, "RAPortableInstall", kCFStringEncodingUTF8);
CFBooleanRef val = CFBundleGetValueForInfoDictionaryKey(bundle, key); if (key)
if (val) {
portable = CFBooleanGetValue(val); CFBooleanRef val = CFBundleGetValueForInfoDictionaryKey(bundle, key);
CFRelease(val); if (val)
CFRelease(key); {
portable = CFBooleanGetValue(val);
CFRelease(val);
}
CFRelease(key);
}
#endif #endif
if (portable) if (portable)
{ {