Skip to content

Commit

Permalink
Merge pull request #4713 from NickAragua/fix_swarm_attack_stop_npe
Browse files Browse the repository at this point in the history
fix #4346
  • Loading branch information
NickAragua authored Aug 18, 2023
2 parents 2af5a9d + e6a353a commit a0b3729
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ public boolean handle(GamePhase phase, Vector<Report> vPhaseReport) {
// Only apply the "stop swarm 'attack'" to the swarmed Mek.
if (ae.getSwarmTargetId() != target.getId()) {
Entity other = game.getEntity(ae.getSwarmTargetId());
other.setSwarmAttackerId(Entity.NONE);

if (other != null) {
other.setSwarmAttackerId(Entity.NONE);
}
} else {
entityTarget.setSwarmAttackerId(Entity.NONE);
}
Expand Down

0 comments on commit a0b3729

Please sign in to comment.