aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/packet_list.cpp
diff options
context:
space:
mode:
authorEvan Huus <eapache@gmail.com>2015-01-26 22:35:12 -0500
committerEvan Huus <eapache@gmail.com>2015-01-27 03:38:13 +0000
commitee320ef1bff411eacd85e160a61608defbc331aa (patch)
tree0c0b7954fa7e645bb4fbbf5bbdb4e16b24041767 /ui/qt/packet_list.cpp
parenta835c85e3d662343d7283f1dcdacb8a11d1d0727 (diff)
qt: clear tree and bytes when no packet selected
Otherwise trying to interact with them will cause all sorts of funny crashes. There's probably a better way to trigger these (having the widgets register for a signal, and sending that signal, or something something something) but this works and I don't feel like reading 20 pages of Qt documentation right this instant. Change-Id: Ic52806ae5ba8d7776f835695590559b8c705d083 Ping-Bug: 10896 Reviewed-on: https://code.wireshark.org/review/6803 Reviewed-by: Evan Huus <eapache@gmail.com>
Diffstat (limited to 'ui/qt/packet_list.cpp')
-rw-r--r--ui/qt/packet_list.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/ui/qt/packet_list.cpp b/ui/qt/packet_list.cpp
index d3a4af5b35..c389b5ecc0 100644
--- a/ui/qt/packet_list.cpp
+++ b/ui/qt/packet_list.cpp
@@ -654,6 +654,10 @@ void PacketList::thaw()
setModel(packet_list_model_);
setUpdatesEnabled(true);
setColumnVisibility();
+ if (packet_list_model_->rowCount() == 0) {
+ proto_tree_->clear();
+ byte_view_tab_->clear();
+ }
}
void PacketList::clear() {