hedgewars/uGears.pas
changeset 3472 b1832a3761e6
parent 3471 e1f1ab5dfd8f
child 3475 95345f98da19
--- a/hedgewars/uGears.pas	Mon May 17 06:26:06 2010 +0000
+++ b/hedgewars/uGears.pas	Mon May 17 09:45:46 2010 +0000
@@ -509,7 +509,8 @@
 if (Gear^.Kind = gtPortal) then
     begin
     if (Gear^.IntersectGear <> nil) then
-        Gear^.IntersectGear^.IntersectGear:= nil;
+        if (Gear^.IntersectGear^.IntersectGear = Gear) then
+            Gear^.IntersectGear^.IntersectGear:= nil;
     end
 else if Gear^.Kind = gtHedgehog then
     if (CurAmmoGear <> nil) and (CurrentHedgehog^.Gear = Gear) then