index aa3bbff038c02bb6c37246f754bf3deb1ee94891..24ea1642e7aa37ec447a509ed4ce2c02627f7bbf 100644 (file)
uses
SysUtils, Classes,
+ r_common,
e_log, e_res, WADReader, Config,
g_console, // cvar declaration
Imaging, ImagingTypes, ImagingUtility
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;
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;