author | unc0rr |
Fri, 17 Apr 2009 17:02:24 +0000 | |
changeset 2000 | f9f47e681aad |
parent 1999 | a28dcfe658e3 |
child 2001 | d909152bdc21 |
--- a/hedgewars/uMisc.pas Fri Apr 17 17:01:58 2009 +0000 +++ b/hedgewars/uMisc.pas Fri Apr 17 17:02:24 2009 +0000 @@ -452,8 +452,11 @@ procedure FreeTexture(tex: PTexture); begin -glDeleteTextures(1, @tex^.id); -dispose(tex) +if tex <> nil then + begin + glDeleteTextures(1, @tex^.id); + dispose(tex) + end end; function DecodeBase64(s: shortstring): shortstring;