hedgewars/uGearsHedgehog.pas
changeset 13758 885404cdf07a
parent 13752 52959f686082
child 13771 9fdb13633bcb
--- a/hedgewars/uGearsHedgehog.pas	Mon Sep 03 20:01:50 2018 +0200
+++ b/hedgewars/uGearsHedgehog.pas	Mon Sep 03 20:16:54 2018 +0200
@@ -638,7 +638,7 @@
                 begin
                 if TagTurnTimeLeft = 0 then
                     TagTurnTimeLeft:= TurnTimeLeft;
-                if (HHGear^.State and gstHHDriven) <> 0 then
+                if (HHGear <> nil) and ((HHGear^.State and gstHHDriven) <> 0) then
                     begin
                     if (CurAmmoGear <> nil) and (CurAmmoGear^.State and gstSubmersible <> 0) and CheckCoordInWater(hwRound(CurAmmoGear^.X), hwRound(CurAmmoGear^.Y)) then
                          TurnTimeLeft:=(Ammoz[a].TimeAfterTurn * cGetAwayTime) div 25