aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/main_window_slots.cpp
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2016-08-25 18:03:35 +0200
committerPeter Wu <peter@lekensteyn.nl>2016-08-26 08:59:11 +0000
commit09be46361bab677842cc598405cbc7a44b974f1f (patch)
tree633e5d0998bcbe68a46d06d0856b8d637adf0a80 /ui/qt/main_window_slots.cpp
parent17f977ec5695259ec02c7e6e4cd24e3e2ed263c1 (diff)
qt: fix crash on Search Packet while redissecting
Before redissection, PacketList::freeze() is called which clears the model. This results in a NULL-deref when pressing Ctrl-F (Packet Search) or Ctrl-G (Go To Packet). Reproducer: in a large capture file, enter some display filter (e.g. "udp") and immediately press Ctrl-F. Thanks to Github user SNAPESNATCH for the initial report via IRC that included a helpful stack trace on Windows. Change-Id: If7334d6df4e9591fb1f2a52e3e2f837285b2959f Reviewed-on: https://code.wireshark.org/review/17326 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'ui/qt/main_window_slots.cpp')
-rw-r--r--ui/qt/main_window_slots.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/qt/main_window_slots.cpp b/ui/qt/main_window_slots.cpp
index 7bbdf11ba6..6a06b0a888 100644
--- a/ui/qt/main_window_slots.cpp
+++ b/ui/qt/main_window_slots.cpp
@@ -2003,7 +2003,7 @@ void MainWindow::on_actionEditCopyAsFilter_triggered()
void MainWindow::on_actionEditFindPacket_triggered()
{
- if (packet_list_->model()->rowCount() < 1) {
+ if (packet_list_->packetListModel()->rowCount() < 1) {
return;
}
previous_focus_ = wsApp->focusWidget();
@@ -3428,7 +3428,7 @@ void MainWindow::on_actionHelpAbout_triggered()
}
void MainWindow::on_actionGoGoToPacket_triggered() {
- if (packet_list_->model()->rowCount() < 1) {
+ if (packet_list_->packetListModel()->rowCount() < 1) {
return;
}
previous_focus_ = wsApp->focusWidget();