Skip to content

Commit

Permalink
null guard
Browse files Browse the repository at this point in the history
  • Loading branch information
SJuliez committed Nov 3, 2024
1 parent 4bf1901 commit eccae84
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 @@ -7716,7 +7716,7 @@ public PilotingRollData checkSkid(EntityMovementType moveType, Hex prevHex,
addPilotingModifierForTerrain(roll, lastPos);
}

boolean prevStepPavement = (prevStep != null) ? prevStep.isPavementStep() : prevHex.hasPavement();
boolean prevStepPavement = (prevStep != null) ? prevStep.isPavementStep() : ((prevHex != null) && prevHex.hasPavement());
PlanetaryConditions conditions = game.getPlanetaryConditions();
boolean affectedByIce = !movementMode.isHoverOrWiGE() || conditions.getWind().isStrongerThan(Wind.STRONG_GALE);
boolean runOrSprint = (overallMoveType == EntityMovementType.MOVE_RUN) || (overallMoveType == EntityMovementType.MOVE_SPRINT);
Expand Down

0 comments on commit eccae84

Please sign in to comment.