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>
This commit is contained in:
Peter Wu 2016-08-25 18:03:35 +02:00
parent 17f977ec56
commit 09be46361b
1 changed files with 2 additions and 2 deletions

View File

@ -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();