omwlauncher crash when can't read file in active profile (Fixes #1069)

pull/413/head
dteviot 10 years ago
parent 66040e3a7b
commit ad5d884761

@ -64,29 +64,17 @@ void ContentSelectorView::ContentSelector::buildAddonView()
void ContentSelectorView::ContentSelector::setProfileContent(const QStringList &fileList) void ContentSelectorView::ContentSelector::setProfileContent(const QStringList &fileList)
{ {
clearCheckStates(); clearCheckStates();
bool foundGamefile = false;
foreach (const QString &filepath, fileList) foreach (const QString &filepath, fileList)
{ {
if (!foundGamefile) const ContentSelectorModel::EsmFile *file = mContentModel->item(filepath);
if (file && file->isGameFile())
{ {
const ContentSelectorModel::EsmFile *file = mContentModel->item(filepath); setGameFile (filepath);
break;
foundGamefile = (file->isGameFile());
if (foundGamefile)
{
setGameFile (filepath);
break;
}
} }
} }
/* if (!foundGameFile)
{
//throw gamefile error here.
}*/
setCheckStates (fileList); setCheckStates (fileList);
} }

Loading…
Cancel
Save