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>
This commit is contained in:
Roland Knall 2017-07-04 13:06:09 +02:00 committed by Michael Mann
parent c5e1e61fb0
commit 0612af8deb
1 changed files with 2 additions and 0 deletions

View File

@ -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;