hedgewars/uGears.pas
changeset 3432 83cef0f08a86
parent 3429 1f12646331d4
child 3437 858105ae769c
--- a/hedgewars/uGears.pas	Thu May 06 03:12:42 2010 +0000
+++ b/hedgewars/uGears.pas	Thu May 06 09:25:13 2010 +0000
@@ -515,9 +515,10 @@
 
 // make sure that portals have their link removed before deletion
 if (Gear^.Kind = gtPortal) then
+    begin
     if (Gear^.IntersectGear <> nil) then
-        Gear^.IntersectGear^.IntersectGear:= nil
-
+        Gear^.IntersectGear^.IntersectGear:= nil;
+    end
 else if Gear^.Kind = gtHedgehog then
     if (CurAmmoGear <> nil) and (CurrentHedgehog^.Gear = Gear) then
         begin