From 1c630e60cfe9485fdd50f9cc6c36156711b7cc08 Mon Sep 17 00:00:00 2001 From: Karl Blomster Date: Tue, 30 Jun 2009 20:44:38 +0000 Subject: [PATCH] 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. --- aegisub/src/gl_text.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/aegisub/src/gl_text.cpp b/aegisub/src/gl_text.cpp index 4daceb690..3689cba8e 100644 --- a/aegisub/src/gl_text.cpp +++ b/aegisub/src/gl_text.cpp @@ -268,10 +268,8 @@ OpenGLTextTexture::OpenGLTextTexture(int w,int h) { ////////////////////// // Texture destructor OpenGLTextTexture::~OpenGLTextTexture() { - if (tex) { + if (tex) glDeleteTextures(1,&tex); - tex = 0; - } }