hedgewars/GSHandlers.inc
changeset 3416 310fda7c1dc5
parent 3415 1ca22b3493e9
child 3417 27ff4a6375dd
--- a/hedgewars/GSHandlers.inc	Tue May 04 02:34:23 2010 +0000
+++ b/hedgewars/GSHandlers.inc	Tue May 04 02:46:23 2010 +0000
@@ -3045,7 +3045,12 @@
 var iterator: PGear;
     s: hwFloat;
 begin
-    if (Land[hwRound(Gear^.Y), hwRound(Gear^.X)] and $FF00) = 0 then DeleteGear(Gear);
+    if (Land[hwRound(Gear^.Y), hwRound(Gear^.X)] and $FF00) = 0 then
+        begin
+        DeleteGear(Gear);
+        EXIT;
+        end;
+        
     if Gear^.IntersectGear <> nil then
     //if (Gear^.IntersectGear <> nil) then
         begin