Fixed typo in function tdLastSentValue() on non libconfuse platforms (Mac OS X and Windows), this fixes #30

This commit is contained in:
Micke Prag 2009-08-19 07:05:56 +00:00
parent 342fc2d272
commit fee239b670
3 changed files with 934 additions and 881 deletions

View file

@ -209,11 +209,15 @@ int Settings::getIntSetting(int intDeviceId, const std::string &name, bool param
// If the preference exists, use it.
if (cfvalue) {
// Numbers come out of preferences as CFNumber objects.
if (!CFNumberGetValue(cfvalue, kCFNumberIntType, &retval)) {
retval = 0;
}
CFRelease(cfvalue);
try {
// Numbers come out of preferences as CFNumber objects.
if (!CFNumberGetValue(cfvalue, kCFNumberIntType, &retval)) {
retval = 0;
}
CFRelease(cfvalue);
} catch (std::exception e) {
retval = 0;
}
}
return retval;