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:
parent
e6e02714a0
commit
295ca86ac1
1 changed files with 3 additions and 1 deletions
|
@ -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…
Reference in a new issue