diff options
author | Guy Harris <guy@alum.mit.edu> | 2016-02-26 11:35:06 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2016-02-26 19:35:52 +0000 |
commit | 4c3a6a8ef4cd12aec245429f084e4c7b60db70a4 (patch) | |
tree | 1bd2aa8db725f3effbe87dd02478e34637bde256 /ui | |
parent | 4a38f429b650b28b13da176af2174bae73bd1638 (diff) | |
download | wireshark-4c3a6a8ef4cd12aec245429f084e4c7b60db70a4.tar.gz |
Empty out InterfaceTree::updateGlobalDeviceSelections() if no pcap.
It doesn't even need to bother checking the argument.
Change-Id: I2cdc9d7da24392ff3fae84e31442530c2e854734
Reviewed-on: https://code.wireshark.org/review/14174
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'ui')
-rw-r--r-- | ui/qt/interface_tree.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/ui/qt/interface_tree.cpp b/ui/qt/interface_tree.cpp index 5a95dc2810..b696e09df9 100644 --- a/ui/qt/interface_tree.cpp +++ b/ui/qt/interface_tree.cpp @@ -354,12 +354,8 @@ void InterfaceTree::updateStatistics(void) { // Column name_col UserRole data MUST be set to the interface name. void InterfaceTree::updateGlobalDeviceSelections(QTreeWidget *if_tree, int name_col) { -#ifndef HAVE_LIBPCAP - Q_UNUSED(name_col) -#endif - - if (!if_tree) return; #ifdef HAVE_LIBPCAP + if (!if_tree) return; QTreeWidgetItemIterator iter(if_tree); global_capture_opts.num_selected = 0; @@ -389,6 +385,9 @@ void InterfaceTree::updateGlobalDeviceSelections(QTreeWidget *if_tree, int name_ } ++iter; } +#else // HAVE_LIBPCAP + Q_UNUSED(if_tree) + Q_UNUSED(name_col) #endif // HAVE_LIBPCAP } |