summaryrefslogtreecommitdiff
path: root/ui/qt/packet_list.cpp
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2015-09-30 14:35:13 +0200
committerPeter Wu <peter@lekensteyn.nl>2015-09-30 12:40:06 +0000
commit1d0532fee52bcb507c91ad1b500fb0965951c6b1 (patch)
tree67fd8abaf98f1f9c87fc9f1cad791b3176620830 /ui/qt/packet_list.cpp
parentf52d1d52a6247aa04dc328d081736b387ad8be6c (diff)
downloadwireshark-1d0532fee52bcb507c91ad1b500fb0965951c6b1.tar.gz
qt: warn when jumping to an invalid packet number
I was confused when double-clicking a packet number did not work. It turns out that the display filter was hiding the destination. Check the packet number for sanity, just like GTK+ does. Change-Id: If50b2a3091a468f880b42fd2385f1b74c30d2f2b Reviewed-on: https://code.wireshark.org/review/10700 Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'ui/qt/packet_list.cpp')
-rw-r--r--ui/qt/packet_list.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/ui/qt/packet_list.cpp b/ui/qt/packet_list.cpp
index 328c609f1b..5d1676286c 100644
--- a/ui/qt/packet_list.cpp
+++ b/ui/qt/packet_list.cpp
@@ -1000,6 +1000,7 @@ void PacketList::goLastPacket(void) {
// XXX We can jump to the wrong packet if a display filter is applied
void PacketList::goToPacket(int packet) {
+ if (!cf_goto_frame(cap_file_, packet)) return;
int row = packet_list_model_->packetNumberToRow(packet);
if (row >= 0) {
setCurrentIndex(packet_list_model_->index(row, 0));