diff -r 18430abfbcd2 -r e70b81854fb9 hedgewars/uTextures.pas --- a/hedgewars/uTextures.pas Mon Jun 25 12:01:19 2012 +0200 +++ b/hedgewars/uTextures.pas Mon Jun 25 12:02:54 2012 +0200 @@ -254,10 +254,6 @@ SDL_UnlockSurface(surf); SetTextureParameters(enableClamp); - - {$IFNDEF RETAIN_SURFACES} - SDL_FreeSurface(surf); - {$ENDIF} end; // deletes texture and frees the memory allocated for it. @@ -278,16 +274,14 @@ TextureList:= tex^.NextTexture; glDeleteTextures(1, @tex^.atlas^.id); - {$IFDEF RETAIN_SURFACES} SDL_FreeSurface(tex^.surface); - {$ENDIF} - Dispose(tex); end end; procedure initModule; begin +uAtlas.initModule; TextureList:= nil; end;