aboutsummaryrefslogtreecommitdiffstats
path: root/ui/preference_utils.c
diff options
context:
space:
mode:
authorRoland Knall <roland.knall@br-automation.com>2017-07-04 13:06:09 +0200
committerMichael Mann <mmann78@netscape.net>2017-07-04 15:13:59 +0000
commit0612af8debc6e2d233db6330b5daa7b694eab3af (patch)
tree4655d5d6f3c4c7a0d31d28490e6f708d229e42e4 /ui/preference_utils.c
parentc5e1e61fb0a6a0cce96d32a7e2f23f82cb108f62 (diff)
UI: Fix preference utils store helper
Fix https://code.wireshark.org/review/19578 changed the behaviour when saving a preference variable, effectively removing the capability to store the value. Change-Id: I6ad6b27e1779b73b58e8a76b37c9b613ff178d30 Reviewed-on: https://code.wireshark.org/review/22508 Reviewed-by: Roland Knall <rknall@gmail.com> Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'ui/preference_utils.c')
-rw-r--r--ui/preference_utils.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ui/preference_utils.c b/ui/preference_utils.c
index 0aebb692e0..95be0c692c 100644
--- a/ui/preference_utils.c
+++ b/ui/preference_utils.c
@@ -104,6 +104,8 @@ prefs_store_ext_helper(const char * module_name, const char *pref_name, const ch
if (prefs_get_type(pref) == PREF_STRING )
{
pref_changed = prefs_set_string_value(pref, pref_value, pref_stashed);
+ if ( ! pref_changed || prefs_get_string_value(pref, pref_stashed) != 0 )
+ pref_changed = prefs_set_string_value(pref, pref_value, pref_current);
}
return pref_changed;