summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2015-11-27 16:32:54 +0100
committerPeter Wu <peter@lekensteyn.nl>2015-11-27 16:34:35 +0000
commit6793a037cc05402d51762a67d8603cff618839b4 (patch)
treeccb0e3bf0c2c6d00adfd530ccbe7ec643a26f319
parent20bfc3d5a9a44132e5cd1ffc3d9364dba7824574 (diff)
downloadwireshark-6793a037cc05402d51762a67d8603cff618839b4.tar.gz
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 <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl> (cherry picked from commit 946222c676dbda138fff0b437be12f8fddab5131) Reviewed-on: https://code.wireshark.org/review/12226
-rw-r--r--ui/qt/capture_file_properties_dialog.cpp3
1 files changed, 2 insertions, 1 deletions
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;
}