aboutsummaryrefslogtreecommitdiff
path: root/launcher/modplatform/flame/FlamePackIndex.cpp
diff options
context:
space:
mode:
authorRyan Cao <70191398+ryanccn@users.noreply.github.com>2022-05-28 21:15:00 +0800
committerGitHub <noreply@github.com>2022-05-28 21:15:00 +0800
commit2be8100e7cb625f3e6356a68f20291c5aa327c02 (patch)
treeeaf364705154e0457a1bde40dff8b2c8d843c8e5 /launcher/modplatform/flame/FlamePackIndex.cpp
parent6d0ea13f97570f837f11022e3ef0fbfb6d0482f5 (diff)
parent3ff26d5cfe293c635655d35e96d093ef0b383dc2 (diff)
downloadPrismLauncher-2be8100e7cb625f3e6356a68f20291c5aa327c02.tar.gz
PrismLauncher-2be8100e7cb625f3e6356a68f20291c5aa327c02.tar.bz2
PrismLauncher-2be8100e7cb625f3e6356a68f20291c5aa327c02.zip
Merge branch 'develop' into global-jvm-args
Diffstat (limited to 'launcher/modplatform/flame/FlamePackIndex.cpp')
-rw-r--r--launcher/modplatform/flame/FlamePackIndex.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/launcher/modplatform/flame/FlamePackIndex.cpp b/launcher/modplatform/flame/FlamePackIndex.cpp
index ac24c647..bece7843 100644
--- a/launcher/modplatform/flame/FlamePackIndex.cpp
+++ b/launcher/modplatform/flame/FlamePackIndex.cpp
@@ -65,8 +65,12 @@ void Flame::loadIndexedPackVersions(Flame::IndexedPack& pack, QJsonArray& arr)
// pick the latest version supported
file.mcVersion = versionArray[0].toString();
file.version = Json::requireString(version, "displayName");
- file.downloadUrl = Json::requireString(version, "downloadUrl");
- unsortedVersions.append(file);
+ file.downloadUrl = Json::ensureString(version, "downloadUrl");
+
+ // only add if we have a download URL (third party distribution is enabled)
+ if (!file.downloadUrl.isEmpty()) {
+ unsortedVersions.append(file);
+ }
}
auto orderSortPredicate = [](const IndexedVersion& a, const IndexedVersion& b) -> bool { return a.fileId > b.fileId; };