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:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user