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/modrinth | |
parent | aa2c27bf6984f9ea2d67411c0f28d802d40834af (diff) | |
download | PrismLauncher-71b1ac9f349c0831f9d5242e88e7eabd38984e28.tar.gz PrismLauncher-71b1ac9f349c0831f9d5242e88e7eabd38984e28.tar.bz2 PrismLauncher-71b1ac9f349c0831f9d5242e88e7eabd38984e28.zip |
Fix braindead moments
Diffstat (limited to 'launcher/modplatform/modrinth')
-rw-r--r-- | launcher/modplatform/modrinth/ModrinthPackIndex.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
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 { |