hedgewars/uGearsHandlersMess.pas
changeset 10234 a3a200e35c6e
parent 10174 710ffaae7d59
child 10251 a3b42e81803c
--- a/hedgewars/uGearsHandlersMess.pas	Tue Apr 29 10:20:45 2014 +0400
+++ b/hedgewars/uGearsHandlersMess.pas	Wed Apr 30 14:17:06 2014 +0400
@@ -3430,7 +3430,7 @@
 
     // pickup bonuses
     t := CheckGearNear(Gear, gtCase, 36, 36);
-    if t <> nil then
+    if (t <> nil) and (HHGear <> nil) then
         PickUp(HHGear, t);
 
     CheckCollision(Gear);
@@ -3464,7 +3464,8 @@
             TurnTimeLeft:= 14 * 125;
             end;
 
-        HHGear^.Message := 0;
+        if HHGear <> nil then 
+            HHGear^.Message := 0;
         ParseCommand('/taunt ' + #1, true)
         end
 end;