hedgewars/uLandObjects.pas
changeset 3057 e6e4c109ceb8
parent 3053 55a7e3a896ef
child 3083 8da8f2515221
equal deleted inserted replaced
3056:141c26d2717d 3057:e6e4c109ceb8
   528 end;
   528 end;
   529 
   529 
   530 procedure FreeLandObjects();
   530 procedure FreeLandObjects();
   531 var i: Longword;
   531 var i: Longword;
   532 begin
   532 begin
   533 for i:= 0 to Pred(ThemeObjects.Count) do
   533 for i:= 0 to Pred(MAXTHEMEOBJECTS) do
   534     with ThemeObjects.objs[i] do
   534     if ThemeObjects.objs[i].Surf <> nil then
   535         if Surf <> nil then SDL_FreeSurface(Surf);
   535         SDL_FreeSurface(ThemeObjects.objs[i].Surf);
   536 for i:= 0 to Pred(SprayObjects.Count) do
   536 for i:= 0 to Pred(MAXTHEMEOBJECTS) do
   537     with SprayObjects.objs[i] do
   537     if SprayObjects.objs[i].Surf <> nil then
   538         if Surf <> nil then SDL_FreeSurface(Surf);
   538         SDL_FreeSurface(SprayObjects.objs[i].Surf);
   539 end;
   539 end;
   540 
   540 
   541 end.
   541 end.