Fix a potential crash on exiting. (An invalid memory location could under certain circumstances be assigned to in the OpenGLTextTexture destructor.)

Originally committed to SVN as r3091.
This commit is contained in:
Karl Blomster 2009-06-30 20:44:38 +00:00
parent 47f0a51e87
commit 1c630e60cf
1 changed files with 1 additions and 3 deletions

View File

@ -268,10 +268,8 @@ OpenGLTextTexture::OpenGLTextTexture(int w,int h) {
//////////////////////
// Texture destructor
OpenGLTextTexture::~OpenGLTextTexture() {
if (tex) {
if (tex)
glDeleteTextures(1,&tex);
tex = 0;
}
}