OpenCS FileDialog crash fix

The file dialog would crash when no game file is selected and an addon file with no dependency is checked, then unchecked.
celladd
scrawl 10 years ago
parent e6e02714a0
commit 295ca86ac1

@ -153,11 +153,13 @@ void CSVDoc::FileDialog::slotUpdateAcceptButton(const QString &name, bool)
if (isNew)
success = success && !(name.isEmpty());
else
else if (success)
{
ContentSelectorModel::EsmFile *file = mSelector->selectedFiles().back();
mAdjusterWidget->setName (file->filePath(), !file->isGameFile());
}
else
mAdjusterWidget->setName ("", true);
ui.projectButtonBox->button (QDialogButtonBox::Ok)->setEnabled (success);
}

Loading…
Cancel
Save