minor dependency crash fix

Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
Trial97 2023-08-25 18:35:25 +03:00
parent c54fecf5d9
commit abfd1a4205
No known key found for this signature in database
GPG Key ID: 55EF5DA53DB36318
2 changed files with 4 additions and 1 deletions

View File

@ -201,6 +201,7 @@ Task::Ptr GetModDependenciesTask::prepareDependencyTask(const ModPlatform::Depen
return;
}
}
removePack(dep.addonId);
qWarning() << "Error while reading mod version empty ";
qDebug() << doc;
return;

View File

@ -211,5 +211,7 @@ ModPlatform::IndexedVersion FlameMod::loadDependencyVersions(const ModPlatform::
return a.date > b.date;
};
std::sort(versions.begin(), versions.end(), orderSortPredicate);
return versions.front();
if (versions.size() != 0)
return versions.front();
return {};
}