# HG changeset patch
# User nemo
# Date 1418055631 18000
# Node ID 992863acb2b78f16403c2c9cd627c6abb8b9dfc9
# Parent  99975e1860d2a355d4587d8d8b62377e270d83b1
sheepluva is right

diff -r 99975e1860d2 -r 992863acb2b7 hedgewars/uGearsList.pas
--- 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;