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>
This commit is contained in:
Peter Wu 2015-11-27 16:32:54 +01:00
parent 1949a971c8
commit 946222c676
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}