summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@users.noreply.github.com>2020-11-29 00:16:00 +0100
committerGitHub <noreply@github.com>2020-11-29 00:16:00 +0100
commited11d33054307be9a8f52689e2706085c3742420 (patch)
treeb883e4ac2953b0ff8ff57af9958135baaaff3471
parent11a21b57e44433895c4eb17e7a7d9790ad43d16e (diff)
parent7321a4fd3d3e19bf4c1b296849a7c876b1f686f0 (diff)
downloadMultiMC-ed11d33054307be9a8f52689e2706085c3742420.tar
MultiMC-ed11d33054307be9a8f52689e2706085c3742420.tar.gz
MultiMC-ed11d33054307be9a8f52689e2706085c3742420.tar.lz
MultiMC-ed11d33054307be9a8f52689e2706085c3742420.tar.xz
MultiMC-ed11d33054307be9a8f52689e2706085c3742420.zip
Merge pull request #3464 from jamierocks/ftb/ignore-dud-packs
NOISSUE Ignore 'dud' FTB packs
-rw-r--r--application/pages/modplatform/ftb/FtbModel.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/application/pages/modplatform/ftb/FtbModel.cpp b/application/pages/modplatform/ftb/FtbModel.cpp
index caf94041..972c5040 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();