summaryrefslogtreecommitdiff
path: root/ui/qt/byte_view_tab.cpp
diff options
context:
space:
mode:
authorGerald Combs <gerald@zing.org>2015-02-22 14:56:38 -0800
committerGerald Combs <gerald@wireshark.org>2015-02-24 00:42:22 +0000
commit770ac9123b9c74e2325b39c5af04455dd14f2aba (patch)
tree0a9c0ee018b9674de0befa06456b4826e8dffadb /ui/qt/byte_view_tab.cpp
parenta6f4bdb874169b7ac6564fa5c17be95fed0aa8ef (diff)
downloadwireshark-770ac9123b9c74e2325b39c5af04455dd14f2aba.tar.gz
Qt: Fix a crash when changing the layout.
Freeze and thaw the packet list when changing the layout. This has the side effect of clearing the proto tree and byte view, which avoids reading a bad tvb pointer. Note that we might want to add a cleanup callback to free_data_sources. Save and restore the current row. Add CaptureFile::currentRow. Fix a couple of comparisons in PacketList. Change-Id: I26f9b97ae5a7cdb4fb6e5e6e675570884900e995 Reviewed-on: https://code.wireshark.org/review/7337 Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'ui/qt/byte_view_tab.cpp')
-rw-r--r--ui/qt/byte_view_tab.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/ui/qt/byte_view_tab.cpp b/ui/qt/byte_view_tab.cpp
index 4df8cb39a7..3b2c138cfd 100644
--- a/ui/qt/byte_view_tab.cpp
+++ b/ui/qt/byte_view_tab.cpp
@@ -24,6 +24,10 @@
#include <QTabBar>
#include <QTreeWidgetItem>
+// To do:
+// - We might want to add a callback to free_data_sources in so that we
+// don't have to blindly call clear().
+
ByteViewTab::ByteViewTab(QWidget *parent) :
QTabWidget(parent)
{