Skip to content

Commit

Permalink
Merge pull request #6284 from Scoppio/fix/npe-eject-crew
Browse files Browse the repository at this point in the history
fix: fixes NPE when checking if ejection is possible
  • Loading branch information
IllianiCBT authored Dec 19, 2024
2 parents b0941d7 + ba6cfe2 commit c67da87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion megamek/src/megamek/common/Tank.java
Original file line number Diff line number Diff line change
Expand Up @@ -2987,7 +2987,7 @@ public long getEntityType() {

@Override
public boolean isEjectionPossible() {
return game.getOptions().booleanOption(OptionsConstants.ADVGRNDMOV_VEHICLES_CAN_EJECT)
return game != null && game.getOptions().booleanOption(OptionsConstants.ADVGRNDMOV_VEHICLES_CAN_EJECT)
&& getCrew().isActive()
&& !hasQuirk(OptionsConstants.QUIRK_NEG_NO_EJECT);
}
Expand Down

0 comments on commit c67da87

Please sign in to comment.