summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--comms/telldus-core/files/patch-service-SettingsConfuse.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/comms/telldus-core/files/patch-service-SettingsConfuse.cpp b/comms/telldus-core/files/patch-service-SettingsConfuse.cpp
index 67b148107333..b51e9bf0f63c 100644
--- a/comms/telldus-core/files/patch-service-SettingsConfuse.cpp
+++ b/comms/telldus-core/files/patch-service-SettingsConfuse.cpp
@@ -9,3 +9,34 @@
cfg_t *cfg;
cfg_t *var_cfg;
};
+@@ -42,10 +44,10 @@
+ */
+ Settings::~Settings(void) {
+ TelldusCore::MutexLocker locker(&mutex);
+- if (d->cfg > 0) {
++ if (d->cfg != 0) {
+ cfg_free(d->cfg);
+ }
+- if (d->var_cfg > 0) {
++ if (d->var_cfg != 0) {
+ cfg_free(d->var_cfg);
+ }
+ delete d;
+@@ -56,7 +58,7 @@
+ */
+ std::wstring Settings::getSetting(const std::wstring &strName) const {
+ TelldusCore::MutexLocker locker(&mutex);
+- if (d->cfg > 0) {
++ if (d->cfg != 0) {
+ std::string setting(cfg_getstr(d->cfg, TelldusCore::wideToString(strName).c_str()));
+ return TelldusCore::charToWstring(setting.c_str());
+ }
+@@ -68,7 +70,7 @@
+ */
+ int Settings::getNumberOfNodes(Node node) const {
+ TelldusCore::MutexLocker locker(&mutex);
+- if (d->cfg > 0) {
++ if (d->cfg != 0) {
+ if (node == Device) {
+ return cfg_size(d->cfg, "device");
+ } else if (node == Controller) {