1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 19:19:56 +00:00

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.
This commit is contained in:
scrawl 2015-03-16 02:43:02 +01:00
parent e6e02714a0
commit 295ca86ac1

View file

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