diff --git a/core/src/com/unciv/ui/tilegroups/TileGroupIcons.kt b/core/src/com/unciv/ui/tilegroups/TileGroupIcons.kt index 40a314b3cc..6fc6e02002 100644 --- a/core/src/com/unciv/ui/tilegroups/TileGroupIcons.kt +++ b/core/src/com/unciv/ui/tilegroups/TileGroupIcons.kt @@ -53,6 +53,7 @@ class TileGroupIcons(val tileGroup: TileGroup){ fun newUnitIcon(unit: MapUnit?, oldUnitGroup: UnitGroup?, isViewable: Boolean, yFromCenter: Float, viewingCiv: CivilizationInfo?): UnitGroup? { var newImage: UnitGroup? = null // The unit can change within one update - for instance, when attacking, the attacker replaces the defender! + oldUnitGroup?.unitBaseImage?.remove() oldUnitGroup?.remove() if (unit != null && isViewable) { // Tile is visible