Skip to content

Commit

Permalink
Merge pull request #4953 from kuronekochomusuke/npe_ghostTargetRoll
Browse files Browse the repository at this point in the history
null check for ghostTargetRoll
  • Loading branch information
SJuliez authored Dec 13, 2023
2 parents 46f53fd + bc2af40 commit 0915c16
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion megamek/src/megamek/common/Entity.java
Original file line number Diff line number Diff line change
Expand Up @@ -5187,7 +5187,7 @@ public boolean hasGhostTargets(boolean active) {
}

// if you failed your ghost target PSR, then it doesn't matter
if ((active && (getGhostTargetRollMoS() < 0)) || isShutDown()) {
if ((ghostTargetRoll == null) || (active && (getGhostTargetRollMoS() < 0)) || isShutDown()) {
return false;
}
boolean hasGhost = false;
Expand Down

0 comments on commit 0915c16

Please sign in to comment.