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 b3a69668bf
commit 383d0f3149

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;
}
}