hedgewars/uGearsHandlersMess.pas
changeset 10174 710ffaae7d59
parent 10164 0570d4b22187
child 10234 a3a200e35c6e
--- a/hedgewars/uGearsHandlersMess.pas	Sun Mar 02 00:34:18 2014 +0400
+++ b/hedgewars/uGearsHandlersMess.pas	Mon Mar 03 22:36:30 2014 +0400
@@ -1316,6 +1316,13 @@
 begin
     cArtillery := true;
     HHGear := Gear^.Hedgehog^.Gear;
+
+    if HHGear = nil then
+        begin
+        DeleteGear(gear);
+        exit
+        end;
+
     HHGear^.State := HHGear^.State or gstNotKickable;
     HedgehogChAngle(HHGear);
     if not cLaserSighting then