diff --git a/game-app/game-core/src/main/java/games/strategy/engine/data/changefactory/units/UnitDamageReceivedChange.java b/game-app/game-core/src/main/java/games/strategy/engine/data/changefactory/units/UnitDamageReceivedChange.java index 0ebf9376beb..91ae9050620 100644 --- a/game-app/game-core/src/main/java/games/strategy/engine/data/changefactory/units/UnitDamageReceivedChange.java +++ b/game-app/game-core/src/main/java/games/strategy/engine/data/changefactory/units/UnitDamageReceivedChange.java @@ -50,7 +50,9 @@ protected void perform(final GameState data) { newTotalDamage.forEach( (unitId, damage) -> { final Unit unit = data.getUnits().get(UUID.fromString(unitId)); - unit.setHits(damage); + if (unit != null) { + unit.setHits(damage); + } }); // invoke territory change listeners for (final String territory : territoriesToNotify) {