mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 01:54:20 +03:00
fix crash when updating datapacks
parent PR #5101 so for datapacks and datapacks only we need an extra check. Why? Because Datapacks are treated as ModLoaderType but they aren't a modloader. So the modLoaderTypesToList will generate an empty list even if loader is 64 (not 0). Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
437242169d
commit
d958a91ce9
1 changed files with 4 additions and 1 deletions
|
|
@ -151,7 +151,10 @@ void ModrinthCheckUpdate::checkVersionsResponse(QByteArray* response, std::optio
|
|||
// so we may want to filter it
|
||||
QString loader_filter;
|
||||
if (loader.has_value() && loader != 0) {
|
||||
loader_filter = ModPlatform::getModLoaderAsString(ModPlatform::modLoaderTypesToList(*loader).first());
|
||||
auto modLoaders = ModPlatform::modLoaderTypesToList(*loader);
|
||||
if (!modLoaders.isEmpty()) {
|
||||
loader_filter = ModPlatform::getModLoaderAsString(modLoaders.first());
|
||||
}
|
||||
}
|
||||
|
||||
// Currently, we rely on a couple heuristics to determine whether an update is actually available or not:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue