X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Frenders%2Fopengl%2Fr_textures.pas;h=24ea1642e7aa37ec447a509ed4ce2c02627f7bbf;hb=6dd60afe238e2d7e403568cc286e8f1152b138a0;hp=aa3bbff038c02bb6c37246f754bf3deb1ee94891;hpb=0592c8529428165e2523e0cb054bff29e297777a;p=d2df-sdl.git diff --git a/src/game/renders/opengl/r_textures.pas b/src/game/renders/opengl/r_textures.pas index aa3bbff..24ea164 100644 --- a/src/game/renders/opengl/r_textures.pas +++ b/src/game/renders/opengl/r_textures.pas @@ -138,6 +138,7 @@ implementation uses SysUtils, Classes, + r_common, e_log, e_res, WADReader, Config, g_console, // cvar declaration Imaging, ImagingTypes, ImagingUtility @@ -331,8 +332,8 @@ implementation var i: Integer; begin for i := 0 to self.count - 1 do - self.mTexture[i].Free; - self.mTexture := nil; + r_Common_FreeAndNil(self.mTexture[i]); + SetLength(self.mTexture, 0); inherited; end; @@ -413,10 +414,10 @@ implementation begin glDeleteTextures(1, @atl[i].id); atl[i].id := 0; - atl[i].Free; + r_Common_FreeAndNil(atl[i]); end; - atl := nil; end; + SetLength(atl, 0); end; function r_Textures_FixImageData (var img: TImageData): Boolean;