Re-fix the fix in r3091; the issue wasn't what I thought it was, it was that memory was being freed twice. Fixes #906.

Originally committed to SVN as r3100.
This commit is contained in:
Karl Blomster 2009-07-08 13:30:24 +00:00
parent d1e5ff32e6
commit a9b479bd53
1 changed files with 3 additions and 2 deletions

View File

@ -61,7 +61,6 @@ OpenGLText::~OpenGLText() {
/////////
// Reset
void OpenGLText::Reset() {
for (unsigned int i=0;i<textures.size();i++) delete textures[i];
textures.clear();
glyphs.clear();
}
@ -268,8 +267,10 @@ OpenGLTextTexture::OpenGLTextTexture(int w,int h) {
//////////////////////
// Texture destructor
OpenGLTextTexture::~OpenGLTextTexture() {
if (tex)
if (tex) {
glDeleteTextures(1,&tex);
tex = 0;
}
}