Merge pull request #3464 from jamierocks/ftb/ignore-dud-packs

NOISSUE Ignore 'dud' FTB packs
This commit is contained in:
Petr Mrázek 2020-11-29 00:16:00 +01:00 committed by GitHub
commit ed11d33054
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -206,6 +206,14 @@ void ListModel::packRequestFinished()
return;
}
// Since there is no guarantee that packs have a version, this will just
// ignore those "dud" packs.
if (pack.versions.empty())
{
qWarning() << "FTB Pack " << pack.id << " ignored. reason: lacking any versions";
return;
}
beginInsertRows(QModelIndex(), modpacks.size(), modpacks.size());
modpacks.append(pack);
endInsertRows();