From 10c412d8c7c2ff06573ec4f3d631f45bdf79a045 Mon Sep 17 00:00:00 2001 From: Atlante45 Date: Mon, 16 May 2016 18:43:59 -0700 Subject: [PATCH] Fix settings getting reset fixes bugzid:531 When a setting handle was created but never initialized/used, it would override the current value with the default value on destruction. --- libraries/shared/src/SettingInterface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/shared/src/SettingInterface.cpp b/libraries/shared/src/SettingInterface.cpp index 6c5431a13e..a931875771 100644 --- a/libraries/shared/src/SettingInterface.cpp +++ b/libraries/shared/src/SettingInterface.cpp @@ -97,7 +97,7 @@ namespace Setting { } void Interface::deinit() { - if (privateInstance) { + if (_isInitialized && privateInstance) { // Save value to disk save();