From 7321a4fd3d3e19bf4c1b296849a7c876b1f686f0 Mon Sep 17 00:00:00 2001 From: Jamie Mansfield Date: Sat, 28 Nov 2020 22:13:53 +0000 Subject: [PATCH] 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). --- application/pages/modplatform/ftb/FtbModel.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/application/pages/modplatform/ftb/FtbModel.cpp b/application/pages/modplatform/ftb/FtbModel.cpp index ecdcb00b..2c646495 100644 --- a/application/pages/modplatform/ftb/FtbModel.cpp +++ b/application/pages/modplatform/ftb/FtbModel.cpp @@ -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();