1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2024-11-15 05:59:16 +00:00

OS X: Fix a memory overrelease.

CoreFoundation functions that have "Get" in their names usually don't need to be released.
This commit is contained in:
C.W. Betts 2014-06-27 14:48:24 -06:00
parent 6b82ea86be
commit bc260fa581

View file

@ -7,7 +7,6 @@
#endif
#ifdef BBGE_BUILD_MACOSX
#include <Carbon/Carbon.h>
#include <CoreFoundation/CFLocale.h>
#include <CoreFoundation/CFString.h>
@ -112,13 +111,11 @@ std::string getSystemLocale()
if ((buf = (CFStringRef)CFLocaleGetValue(locale, kCFLocaleLanguageCode)) != NULL)
{
localeStr = _CFToStdString(buf);
CFRelease(buf);
if ((buf = (CFStringRef)CFLocaleGetValue(locale, kCFLocaleCountryCode)) != NULL)
{
localeStr += "_";
localeStr += _CFToStdString(buf);
CFRelease(buf);
}
}