diff options
author | Jaap Keuter <jaap.keuter@xs4all.nl> | 2019-05-13 22:51:10 +0200 |
---|---|---|
committer | Peter Wu <peter@lekensteyn.nl> | 2019-05-15 21:47:06 +0000 |
commit | 757ada0e241bc8e6a257cc771e7817dc0a29d997 (patch) | |
tree | f4e0be4e33f9357cb1c796323d65dce1aba9c60c /ui/qt/capture_preferences_frame.cpp | |
parent | 1573d4ddb2d0ff4dfa5b41f91f5620f1c7dd475f (diff) |
Qt: Fix no interface load preference handling
In handling the capture preferences frame, the preference to not load
interfaces on startup is handled incorrectly. Instead of using the
preference value itself, the validity of the pointer to the preference is
used. This leads to some confusing logic.
Replacing this code with proper preference retrieval.
This was introduced with commit 7a07832712cc0b533acadec2d627528e624033b6
CID 1439697
Change-Id: I9bf3df413d89f8df55553a7218f34d425eb103de
Reviewed-on: https://code.wireshark.org/review/33187
Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'ui/qt/capture_preferences_frame.cpp')
-rw-r--r-- | ui/qt/capture_preferences_frame.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ui/qt/capture_preferences_frame.cpp b/ui/qt/capture_preferences_frame.cpp index 08f1271b0e..54aba54e6c 100644 --- a/ui/qt/capture_preferences_frame.cpp +++ b/ui/qt/capture_preferences_frame.cpp @@ -69,7 +69,8 @@ void CapturePreferencesFrame::updateWidgets() default_device_string = prefs_get_string_value(pref_device_, pref_stashed); } ui->defaultInterfaceComboBox->clear(); - if (global_capture_opts.all_ifaces->len == 0 && !pref_no_interface_load_) { + if ((global_capture_opts.all_ifaces->len == 0) && + (prefs_get_bool_value(pref_no_interface_load_, pref_stashed) == FALSE)) { /* * No interfaces - try refreshing the local interfaces, to * see whether any have showed up (or privileges have changed |