mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-10 22:31:40 +02:00
Fix crash on attempt to update mod that depends on unknown mod
This commit is contained in:
@@ -1053,7 +1053,13 @@ QStringList CModListView::getUpdateableMods()
|
|||||||
for(const auto & modName : modStateModel->getAllMods())
|
for(const auto & modName : modStateModel->getAllMods())
|
||||||
{
|
{
|
||||||
auto mod = modStateModel->getMod(modName);
|
auto mod = modStateModel->getMod(modName);
|
||||||
if (mod.isUpdateAvailable())
|
if (!mod.isUpdateAvailable())
|
||||||
|
continue;
|
||||||
|
|
||||||
|
QStringList notInstalledDependencies = getModsToInstall(mod.getID());
|
||||||
|
QStringList unavailableDependencies = findUnavailableMods(notInstalledDependencies);
|
||||||
|
|
||||||
|
if (unavailableDependencies.empty())
|
||||||
result.push_back(modName);
|
result.push_back(modName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user