diff --git a/core/src/com/unciv/logic/city/CityReligion.kt b/core/src/com/unciv/logic/city/CityReligion.kt index 0e28b3428b..e28e8062b8 100644 --- a/core/src/com/unciv/logic/city/CityReligion.kt +++ b/core/src/com/unciv/logic/city/CityReligion.kt @@ -190,13 +190,13 @@ class CityInfoReligionManager { * Should be called whenever a city changes hands, e.g. conquering and trading */ fun removeUnknownPantheons() { - for (pressure in pressures) { - if (pressure.key == Constants.noReligionName) continue - val correspondingReligion = cityInfo.civInfo.gameInfo.religions[pressure.key]!! + for (pressure in pressures.keys.toList()) { // Copy the keys because we might modify + if (pressure == Constants.noReligionName) continue + val correspondingReligion = cityInfo.civInfo.gameInfo.religions[pressure]!! if (correspondingReligion.isPantheon() && correspondingReligion.foundingCivName != cityInfo.civInfo.civName ) { - pressures.remove(pressure.key) + pressures.remove(pressure) } } updateNumberOfFollowers() diff --git a/core/src/com/unciv/ui/cityscreen/CityStatsTable.kt b/core/src/com/unciv/ui/cityscreen/CityStatsTable.kt index 1180fd9cba..634aeca14a 100644 --- a/core/src/com/unciv/ui/cityscreen/CityStatsTable.kt +++ b/core/src/com/unciv/ui/cityscreen/CityStatsTable.kt @@ -85,11 +85,12 @@ class CityStatsTable(val cityScreen: CityScreen): Table() { private fun addReligionInfo() { val label = cityInfo.religion.getMajorityReligionName() ?: "None" + val icon = if (label == "None") "Religion" else label val expanderTab = ExpanderTab( title = "Majority Religion: [$label]", fontSize = 18, - icon = ImageGetter.getCircledReligionIcon(label, 30f), + icon = ImageGetter.getCircledReligionIcon(icon, 30f), defaultPad = 0f, persistenceID = "CityStatsTable.Religion", startsOutOpened = false,