# HG changeset patch # User sheepluva # Date 1274089546 0 # Node ID b1832a3761e646e6e3cb6b10d4db01851cdadc2b # Parent e1f1ab5dfd8fa69aad8499c8e28e421cac7ab40c portal-link-bugfix: make sure deleted portals don't reset links other than those to themselves diff -r e1f1ab5dfd8f -r b1832a3761e6 hedgewars/uGears.pas --- 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