mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-08 22:26:51 +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())
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user