forked from teamnwah/openmw-tes3coop
omwlauncher crash when can't read file in active profile (Fixes #1069)
This commit is contained in:
parent
66040e3a7b
commit
ad5d884761
1 changed files with 4 additions and 16 deletions
|
@ -64,28 +64,16 @@ void ContentSelectorView::ContentSelector::buildAddonView()
|
|||
void ContentSelectorView::ContentSelector::setProfileContent(const QStringList &fileList)
|
||||
{
|
||||
clearCheckStates();
|
||||
bool foundGamefile = false;
|
||||
|
||||
foreach (const QString &filepath, fileList)
|
||||
{
|
||||
if (!foundGamefile)
|
||||
{
|
||||
const ContentSelectorModel::EsmFile *file = mContentModel->item(filepath);
|
||||
|
||||
foundGamefile = (file->isGameFile());
|
||||
|
||||
if (foundGamefile)
|
||||
if (file && file->isGameFile())
|
||||
{
|
||||
setGameFile (filepath);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* if (!foundGameFile)
|
||||
{
|
||||
//throw gamefile error here.
|
||||
}*/
|
||||
|
||||
setCheckStates (fileList);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue