diff --git a/core/src/com/unciv/logic/BackwardCompatibility.kt b/core/src/com/unciv/logic/BackwardCompatibility.kt index b7e16ec90b..9558d86bc7 100644 --- a/core/src/com/unciv/logic/BackwardCompatibility.kt +++ b/core/src/com/unciv/logic/BackwardCompatibility.kt @@ -66,9 +66,9 @@ object BackwardCompatibility { private fun GameInfo.handleMissingReferencesForEachCity() { for (city in civilizations.asSequence().flatMap { it.cities.asSequence() }) { - for (building in city.cityConstructions.getBuiltBuildings()) { - if (!ruleset.buildings.containsKey(building.name)) - city.cityConstructions.removeBuilding(building) + for (building in city.cityConstructions.builtBuildings.toList()) { + if (!ruleset.buildings.containsKey(building)) + city.cityConstructions.builtBuildings.remove(building) } fun isInvalidConstruction(construction: String) =