Skip to content

Commit

Permalink
Merge pull request #6212 from DM0000/ProtoBug#6211
Browse files Browse the repository at this point in the history
added null check for lastUnitMember
  • Loading branch information
HammerGS authored Nov 23, 2024
2 parents 2590e1e + 204c1f5 commit d602cee
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions megamek/src/megamek/server/totalwarfare/TWGameManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -26989,9 +26989,11 @@ public boolean accept(Entity entity) {
&& (lastUnitNum == entity.getUnitNumber());
}
});
if(lastUnit.next() != null){
Entity lastUnitMember = lastUnit.next();
lastUnitMember.setUnitNumber(deletedUnitNum);
entityUpdate(lastUnitMember.getId());
}
} // End update-unit-number
} // End added-ProtoMek

Expand Down

0 comments on commit d602cee

Please sign in to comment.