Fixed typo in function tdLastSentValue() on non libconfuse platforms (Mac OS X and Windows), this fixes #30
This commit is contained in:
parent
342fc2d272
commit
fee239b670
3 changed files with 934 additions and 881 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue