hedgewars/uMisc.pas
changeset 2000 f9f47e681aad
parent 1916 9c3d0e3df6bb
child 2008 fc2fb5c938c3
equal deleted inserted replaced
1999:a28dcfe658e3 2000:f9f47e681aad
   450 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR)
   450 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR)
   451 end;
   451 end;
   452 
   452 
   453 procedure FreeTexture(tex: PTexture);
   453 procedure FreeTexture(tex: PTexture);
   454 begin
   454 begin
   455 glDeleteTextures(1, @tex^.id);
   455 if tex <> nil then
   456 dispose(tex)
   456 	begin
       
   457 	glDeleteTextures(1, @tex^.id);
       
   458 	dispose(tex)
       
   459 	end
   457 end;
   460 end;
   458 
   461 
   459 function DecodeBase64(s: shortstring): shortstring;
   462 function DecodeBase64(s: shortstring): shortstring;
   460 const table = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
   463 const table = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
   461 var i, t, c: Longword;
   464 var i, t, c: Longword;