From 6793a037cc05402d51762a67d8603cff618839b4 Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Fri, 27 Nov 2015 16:32:54 +0100 Subject: Fix crash in Capture File Properties dialog Fixes crash when a capture file is closed while the capture file properties dialog is open. Change-Id: Iba35be38e1f53d422ff8428a672703385d477660 Reviewed-on: https://code.wireshark.org/review/12224 Petri-Dish: Peter Wu Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu (cherry picked from commit 946222c676dbda138fff0b437be12f8fddab5131) Reviewed-on: https://code.wireshark.org/review/12226 --- ui/qt/capture_file_properties_dialog.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/qt/capture_file_properties_dialog.cpp b/ui/qt/capture_file_properties_dialog.cpp index 50672af9dd..a76002cffd 100644 --- a/ui/qt/capture_file_properties_dialog.cpp +++ b/ui/qt/capture_file_properties_dialog.cpp @@ -86,7 +86,7 @@ void CaptureFilePropertiesDialog::updateWidgets() QPushButton *refresh_bt = ui->buttonBox->button(QDialogButtonBox::Reset); QPushButton *save_bt = ui->buttonBox->button(QDialogButtonBox::Save); - if (file_closed_) { + if (file_closed_ || !cap_file_.isValid()) { if (refresh_bt) { refresh_bt->setEnabled(false); } @@ -94,6 +94,7 @@ void CaptureFilePropertiesDialog::updateWidgets() if (save_bt) { save_bt->setEnabled(false); } + WiresharkDialog::updateWidgets(); return; } -- cgit v1.2.1