hedgewars/uGearsList.pas
changeset 10639 992863acb2b7
parent 10638 99975e1860d2
child 10641 802589828f99
--- a/hedgewars/uGearsList.pas	Mon Dec 08 10:55:56 2014 -0500
+++ b/hedgewars/uGearsList.pas	Mon Dec 08 11:20:31 2014 -0500
@@ -727,9 +727,8 @@
 if lastGearByUID = Gear then
     lastGearByUID := nil;
 if (Gear^.Hedgehog = nil) or (Gear^.Hedgehog^.GearHidden <> Gear) then // hidden hedgehogs shouldn't be in the list
-    RemoveGearFromList(Gear);
-if (Gear^.Hedgehog <> nil) and (Gear^.Hedgehog^.GearHidden = Gear) then
-    Gear^.Hedgehog^.GearHidden:= nil;
+     RemoveGearFromList(Gear)
+else Gear^.Hedgehog^.GearHidden:= nil;
 
 Dispose(Gear)
 end;