浏览代码

Fix uncaught exception if newly updated mod has removed a submod

Ivan Savenko 11 月之前
父节点
当前提交
8a0d327ac2
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lib/modding/ModManager.cpp

+ 1 - 1
lib/modding/ModManager.cpp

@@ -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