diff options
author | Gerald Combs <gerald@zing.org> | 2015-02-22 14:56:38 -0800 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2015-02-24 00:42:22 +0000 |
commit | 770ac9123b9c74e2325b39c5af04455dd14f2aba (patch) | |
tree | 0a9c0ee018b9674de0befa06456b4826e8dffadb /ui/qt/capture_file.cpp | |
parent | a6f4bdb874169b7ac6564fa5c17be95fed0aa8ef (diff) |
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/capture_file.cpp')
-rw-r--r-- | ui/qt/capture_file.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ui/qt/capture_file.cpp b/ui/qt/capture_file.cpp index ed05ea9b04..a32f225f15 100644 --- a/ui/qt/capture_file.cpp +++ b/ui/qt/capture_file.cpp @@ -68,6 +68,13 @@ bool CaptureFile::isValid() const return false; } +int CaptureFile::currentRow() +{ + if (isValid()) + return cap_file_->current_row; + return -1; +} + void CaptureFile::retapPackets() { if (cap_file_) { |