Skip to content

Commit

Permalink
Issue 6247:NPE with TacOps Energy Weapons when Changing Firing Mode
Browse files Browse the repository at this point in the history
  • Loading branch information
psikomonkie committed Dec 9, 2024
1 parent bc7319a commit 1df760f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions megamek/src/megamek/common/weapons/lasers/LaserWeapon.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ public void adaptToGameOptions(GameOptions gOp) {
super.adaptToGameOptions(gOp);

if (!(this instanceof PulseLaserWeapon)) {
if (modes.isEmpty()) {
if (!hasModes()) {
addMode("");
addMode("Pulse");
}
else {
for (var mode : Collections.list(getModes())) {
if(!mode.getName().contains("Pulse")) {
if(!mode.getName().contains("Pulse") && !mode.getName().isEmpty()) {
addMode("Pulse " + mode.getName());
}
}
Expand Down

0 comments on commit 1df760f

Please sign in to comment.