1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-14 10:12:59 +02:00

Fix uncaught exception if newly updated mod has removed a submod

This commit is contained in:
Ivan Savenko 2024-11-26 21:04:56 +00:00
parent 4180ea9523
commit 8a0d327ac2

View File

@ -287,7 +287,7 @@ void ModsPresetState::eraseModSetting(const TModID & modName, const TModID & set
{
const std::string & currentPresetName = modConfig["activePreset"].String();
JsonNode & currentPreset = modConfig["presets"][currentPresetName];
currentPreset["settings"][modName].Struct().erase(modName);
currentPreset["settings"][modName].Struct().erase(settingName);
}
std::vector<TModID> ModsPresetState::getActiveMods() const