Bug fix from Tom Jolly, which adds a check aginst a delete of gl textures

in FTGLTextureFont destructor to prevent a NULL be passed to glDeleteTextures.
This solves the crash on exit of osghud/osgtext.
This commit is contained in:
Robert Osfield
2002-08-31 09:51:52 +00:00
parent 78a86984f1
commit 11bc1b2a77

View File

@@ -50,8 +50,11 @@ FTGLTextureFont::~FTGLTextureFont()
ContextTextureId::iterator itr;
for(itr=glContextTextureID.begin();itr != glContextTextureID.end(); itr++)
{
glDeleteTextures( numTextures, (const GLuint*)*itr);
osgDelete [] *itr;
if (*itr)
{
glDeleteTextures( numTextures, (const GLuint*)*itr);
osgDelete [] *itr;
}
}
}