diff --git a/src/engine/net/client/handlers/AttackCmdMsgHandler.java b/src/engine/net/client/handlers/AttackCmdMsgHandler.java index 0f117971..ea34f163 100644 --- a/src/engine/net/client/handlers/AttackCmdMsgHandler.java +++ b/src/engine/net/client/handlers/AttackCmdMsgHandler.java @@ -58,6 +58,8 @@ public class AttackCmdMsgHandler extends AbstractClientMsgHandler { break; case Building: target = BuildingManager.getBuilding(msg.getTargetID()); + if(target == null) + return true;// early exit for no building pulled Building targetBuilding = (Building) target; if (!targetBuilding.isVulnerable() || targetBuilding.getRank() < 0) return true;// cannot attack destroyed building or protected building