From 06b75181a0a7033e270eae0b8009f5628048f0b5 Mon Sep 17 00:00:00 2001 From: Pascal Quantin Date: Wed, 20 Jan 2016 15:15:23 +0100 Subject: Qt: fix a crash when trying to open TCP stream graph on a truncated TCP packet Do not try to show TCP stream graph window if it was rejected in constructor Change-Id: I4d1401e2c356391ceb8c8e3d37a668fc2a9fc92f Reviewed-on: https://code.wireshark.org/review/13454 Reviewed-by: Pascal Quantin Petri-Dish: Pascal Quantin Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman --- ui/qt/main_window_slots.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ui/qt/main_window_slots.cpp') diff --git a/ui/qt/main_window_slots.cpp b/ui/qt/main_window_slots.cpp index 06abeb5ae4..bf59333d8e 100644 --- a/ui/qt/main_window_slots.cpp +++ b/ui/qt/main_window_slots.cpp @@ -2838,7 +2838,9 @@ void MainWindow::openTcpStreamDialog(int graph_type) packet_list_, SLOT(goToPacket(int))); connect(this, SIGNAL(setCaptureFile(capture_file*)), stream_dialog, SLOT(setCaptureFile(capture_file*))); - stream_dialog->show(); + if (stream_dialog->result() == QDialog::Accepted) { + stream_dialog->show(); + } } void MainWindow::on_actionStatisticsTcpStreamStevens_triggered() -- cgit v1.2.3