mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-06 00:09:23 +07:00
Fix ConcurrentModificationException when puppeting a city (#9430)
This commit is contained in:
@ -203,11 +203,9 @@ class CityPopulationManager : IsPartOfGameInfoSerialization {
|
||||
}
|
||||
|
||||
// unassign specialists that cannot be (e.g. the city was captured and one of the specialist buildings was destroyed)
|
||||
val maxSpecialists = getMaxSpecialists()
|
||||
val specialistsHashmap = specialistAllocations
|
||||
for ((specialistName, amount) in specialistsHashmap)
|
||||
if (amount > maxSpecialists[specialistName])
|
||||
specialistAllocations[specialistName] = maxSpecialists[specialistName]
|
||||
for ((specialistName, maxAmount) in getMaxSpecialists())
|
||||
if (specialistAllocations[specialistName] > maxAmount)
|
||||
specialistAllocations[specialistName] = maxAmount
|
||||
|
||||
val localUniqueCache = LocalUniqueCache()
|
||||
|
||||
|
Reference in New Issue
Block a user