hedgewars/uGearsList.pas
changeset 11539 c22d292e7266
parent 11532 bf86c6cb9341
child 11541 34a0181d5be5
equal deleted inserted replaced
11538:00860966354d 11539:c22d292e7266
   148 if (Gear <> GearsList) and (Gear <> nil) and (Gear^.NextGear = nil) and (Gear^.PrevGear = nil) then
   148 if (Gear <> GearsList) and (Gear <> nil) and (Gear^.NextGear = nil) and (Gear^.PrevGear = nil) then
   149     begin
   149     begin
   150     AddFileLog('Attempted to remove Gear #'+inttostr(Gear^.uid)+' from the list twice.');
   150     AddFileLog('Attempted to remove Gear #'+inttostr(Gear^.uid)+' from the list twice.');
   151     exit
   151     exit
   152     end;
   152     end;
   153 if checkFails((Gear = nil) or (curHandledGear = nil) or (Gear = curHandledGear), 'You''re doing it wrong', true) then exit;
   153     
       
   154 checkFails((Gear = nil) or (curHandledGear = nil) or (Gear = curHandledGear), 'You''re doing it wrong', true);
   154 
   155 
   155 if Gear^.NextGear <> nil then
   156 if Gear^.NextGear <> nil then
   156     Gear^.NextGear^.PrevGear:= Gear^.PrevGear;
   157     Gear^.NextGear^.PrevGear:= Gear^.PrevGear;
   157 if Gear^.PrevGear <> nil then
   158 if Gear^.PrevGear <> nil then
   158     Gear^.PrevGear^.NextGear:= Gear^.NextGear
   159     Gear^.PrevGear^.NextGear:= Gear^.NextGear