From eccae8458935390109e56a3bc353b3ff4ceb6cb9 Mon Sep 17 00:00:00 2001 From: Simon Date: Sun, 3 Nov 2024 10:47:06 +0100 Subject: [PATCH] null guard --- megamek/src/megamek/common/Entity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/megamek/src/megamek/common/Entity.java b/megamek/src/megamek/common/Entity.java index c5ddb55d683..06d10d45800 100644 --- a/megamek/src/megamek/common/Entity.java +++ b/megamek/src/megamek/common/Entity.java @@ -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);