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:
parent
6779781284
commit
bf2b456f0c
1 changed files with 3 additions and 2 deletions
|
@ -61,7 +61,6 @@ OpenGLText::~OpenGLText() {
|
||||||
/////////
|
/////////
|
||||||
// Reset
|
// Reset
|
||||||
void OpenGLText::Reset() {
|
void OpenGLText::Reset() {
|
||||||
for (unsigned int i=0;i<textures.size();i++) delete textures[i];
|
|
||||||
textures.clear();
|
textures.clear();
|
||||||
glyphs.clear();
|
glyphs.clear();
|
||||||
}
|
}
|
||||||
|
@ -268,8 +267,10 @@ OpenGLTextTexture::OpenGLTextTexture(int w,int h) {
|
||||||
//////////////////////
|
//////////////////////
|
||||||
// Texture destructor
|
// Texture destructor
|
||||||
OpenGLTextTexture::~OpenGLTextTexture() {
|
OpenGLTextTexture::~OpenGLTextTexture() {
|
||||||
if (tex)
|
if (tex) {
|
||||||
glDeleteTextures(1,&tex);
|
glDeleteTextures(1,&tex);
|
||||||
|
tex = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue