# HG changeset patch # User nemo # Date 1418758373 18000 # Node ID 31a0e7efa17aef33ab2d64770925521bb1f4ec0d # Parent 1be106f8095a2c0605da8055940a3a19502f78ce just in case. one more nil check diff -r 1be106f8095a -r 31a0e7efa17a hedgewars/uGearsRender.pas --- a/hedgewars/uGearsRender.pas Tue Dec 16 14:29:25 2014 -0500 +++ b/hedgewars/uGearsRender.pas Tue Dec 16 14:32:53 2014 -0500 @@ -1205,9 +1205,12 @@ gtAirBomb: DrawSpriteRotated(sprAirBomb, x, y, 0, DxDy2Angle(Gear^.dY, Gear^.dX)); gtTeleport: begin HHGear:= Gear^.Hedgehog^.Gear; - if ((Gear^.State and gstAnimation) <> 0) then - DrawSpriteRotatedF(sprTeleport, x + 1, y - 3, Gear^.Pos, hwSign(Gear^.dX), 0); - DrawSpriteRotatedF(sprTeleport, hwRound(HHGear^.X) + 1 + WorldDx, hwRound(HHGear^.Y) - 3 + WorldDy, 11 - Gear^.Pos, hwSign(HHGear^.dX), 0); + if HHGear <> nil then + begin + if ((Gear^.State and gstAnimation) <> 0) then + DrawSpriteRotatedF(sprTeleport, x + 1, y - 3, Gear^.Pos, hwSign(Gear^.dX), 0); + DrawSpriteRotatedF(sprTeleport, hwRound(HHGear^.X) + 1 + WorldDx, hwRound(HHGear^.Y) - 3 + WorldDy, 11 - Gear^.Pos, hwSign(HHGear^.dX), 0) + end end; gtSwitcher: DrawSprite(sprSwitch, x - 16, y - 56, (GameTicks shr 6) mod 12); gtTarget: begin