hedgewars/uGearsList.pas
changeset 11532 bf86c6cb9341
parent 11468 2f6f8baa2a97
child 11539 c22d292e7266
equal deleted inserted replaced
11531:d1cf1ff6cabb 11532:bf86c6cb9341
   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 TryDo((Gear = nil) or (curHandledGear = nil) or (Gear = curHandledGear), 'You''re doing it wrong', true);
   153 if checkFails((Gear = nil) or (curHandledGear = nil) or (Gear = curHandledGear), 'You''re doing it wrong', true) then exit;
   154 
   154 
   155 if Gear^.NextGear <> nil then
   155 if Gear^.NextGear <> nil then
   156     Gear^.NextGear^.PrevGear:= Gear^.PrevGear;
   156     Gear^.NextGear^.PrevGear:= Gear^.PrevGear;
   157 if Gear^.PrevGear <> nil then
   157 if Gear^.PrevGear <> nil then
   158     Gear^.PrevGear^.NextGear:= Gear^.NextGear
   158     Gear^.PrevGear^.NextGear:= Gear^.NextGear