NOISSUE Ignore 'dud' FTB packs

There is no guarantee from modpacks.ch that modpacks contain any
versions, which is currently an issue with pack 63 (Direwolf20 1.5).
This commit is contained in:
Jamie Mansfield 2020-11-28 22:13:53 +00:00
parent 88d6b6ea3f
commit 7321a4fd3d
No known key found for this signature in database
GPG Key ID: 36F61598F39F67B0

View File

@ -206,6 +206,14 @@ void ListModel::packRequestFinished()
return; 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()); beginInsertRows(QModelIndex(), modpacks.size(), modpacks.size());
modpacks.append(pack); modpacks.append(pack);
endInsertRows(); endInsertRows();