aboutsummaryrefslogtreecommitdiff
path: root/launcher/modplatform
diff options
context:
space:
mode:
authortimoreo <timo.oreo34@gmail.com>2022-02-01 21:56:52 +0100
committertimoreo <timo.oreo34@gmail.com>2022-02-01 21:56:52 +0100
commit71b1ac9f349c0831f9d5242e88e7eabd38984e28 (patch)
tree5985d6894c6d1bcf485a1af2c7c8959b7a916f84 /launcher/modplatform
parentaa2c27bf6984f9ea2d67411c0f28d802d40834af (diff)
downloadPrismLauncher-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.cpp2
-rw-r--r--launcher/modplatform/modrinth/ModrinthPackIndex.cpp8
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
{