mirror of
https://github.com/vcmi/vcmi.git
synced 2025-12-01 23:12:49 +02:00
Fix crash on attempt to install mod not present in mod repository
This commit is contained in:
@@ -120,6 +120,9 @@ bool ModStateController::disableMod(QString modname)
|
||||
|
||||
bool ModStateController::canInstallMod(QString modname)
|
||||
{
|
||||
if (!modList->isModExists(modname))
|
||||
return true; // for installation of unknown mods, e.g. via "Install from file" option
|
||||
|
||||
auto mod = modList->getMod(modname);
|
||||
|
||||
if(mod.isSubmod())
|
||||
|
||||
Reference in New Issue
Block a user