Skip to content

Commit

Permalink
Fix libretro#16025, crash on non-Metal build
Browse files Browse the repository at this point in the history
  • Loading branch information
warmenhoven committed Feb 9, 2024
1 parent 7b71121 commit c871bcf
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions file_path_special.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,16 @@ bool fill_pathname_application_data(char *s, size_t len)
portable = true;
#else
CFStringRef key = CFStringCreateWithCString(NULL, "RAPortableInstall", kCFStringEncodingUTF8);
CFBooleanRef val = CFBundleGetValueForInfoDictionaryKey(bundle, key);
if (val)
portable = CFBooleanGetValue(val);
CFRelease(val);
CFRelease(key);
if (key)
{
CFBooleanRef val = CFBundleGetValueForInfoDictionaryKey(bundle, key);
if (val)
{
portable = CFBooleanGetValue(val);
CFRelease(val);
}
CFRelease(key);
}
#endif
if (portable)
{
Expand Down

0 comments on commit c871bcf

Please sign in to comment.