diff options
author | timoreo <timo.oreo34@gmail.com> | 2022-02-01 21:56:52 +0100 |
---|---|---|
committer | timoreo <timo.oreo34@gmail.com> | 2022-02-01 21:56:52 +0100 |
commit | 71b1ac9f349c0831f9d5242e88e7eabd38984e28 (patch) | |
tree | 5985d6894c6d1bcf485a1af2c7c8959b7a916f84 /launcher/modplatform | |
parent | aa2c27bf6984f9ea2d67411c0f28d802d40834af (diff) | |
download | PrismLauncher-71b1ac9f349c0831f9d5242e88e7eabd38984e28.tar.gz PrismLauncher-71b1ac9f349c0831f9d5242e88e7eabd38984e28.tar.bz2 PrismLauncher-71b1ac9f349c0831f9d5242e88e7eabd38984e28.zip |
Fix braindead moments
Diffstat (limited to 'launcher/modplatform')
-rw-r--r-- | launcher/modplatform/flame/FlameModIndex.cpp | 2 | ||||
-rw-r--r-- | launcher/modplatform/modrinth/ModrinthPackIndex.cpp | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/launcher/modplatform/flame/FlameModIndex.cpp b/launcher/modplatform/flame/FlameModIndex.cpp index ca8f7fd7..4b81fd7c 100644 --- a/launcher/modplatform/flame/FlameModIndex.cpp +++ b/launcher/modplatform/flame/FlameModIndex.cpp @@ -83,7 +83,7 @@ void FlameMod::loadIndexedPackVersions(FlameMod::IndexedPack & pack, QJsonArray } } } - if(!valid || !hasFabric){ + if(!valid && !hasFabric){ continue; } diff --git a/launcher/modplatform/modrinth/ModrinthPackIndex.cpp b/launcher/modplatform/modrinth/ModrinthPackIndex.cpp index 1a31e940..9017eb67 100644 --- a/launcher/modplatform/modrinth/ModrinthPackIndex.cpp +++ b/launcher/modplatform/modrinth/ModrinthPackIndex.cpp @@ -77,10 +77,12 @@ void Modrinth::loadIndexedPackVersions(Modrinth::IndexedPack & pack, QJsonArray break; } auto parent = files[i].toObject(); - file.downloadUrl = Json::requireString(parent, "url"); - file.fileName = Json::requireString(parent, "filename"); + if(parent.contains("url")) { + file.downloadUrl = Json::requireString(parent, "url"); + file.fileName = Json::requireString(parent, "filename"); - unsortedVersions.append(file); + unsortedVersions.append(file); + } } auto orderSortPredicate = [](const IndexedVersion & a, const IndexedVersion & b) -> bool { |