summaryrefslogtreecommitdiff
path: root/ui/qt/capture_file_properties_dialog.cpp
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:16 +0000
commit946222c676dbda138fff0b437be12f8fddab5131 (patch)
tree08fa41127a6c8e59f91d9373e30ca854ecec0153 /ui/qt/capture_file_properties_dialog.cpp
parent1949a971c81e643133580adee77b8d1fcebd5c33 (diff)
downloadwireshark-946222c676dbda138fff0b437be12f8fddab5131.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>
Diffstat (limited to 'ui/qt/capture_file_properties_dialog.cpp')
-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;
}