Fixed deleting OpenGL textures (patch from boswars upstream)

This commit is contained in:
Pali Rohár 2010-09-09 09:26:21 +02:00
parent b283218a5f
commit b2397c05f2

View file

@ -1187,6 +1187,12 @@ void CGraphic::Resize(int w, int h)
}
}
if (UseOpenGL && Textures) {
glDeleteTextures(NumTextures, Textures);
delete[] Textures;
Textures = NULL;
}
this->Width = this->Height = 0;
this->Surface = NULL;
this->Load();
@ -1295,7 +1301,7 @@ void CGraphic::Resize(int w, int h)
Width = GraphicWidth = w;
Height = GraphicHeight = h;
if (UseOpenGL) {
if (UseOpenGL && Textures) {
glDeleteTextures(NumTextures, Textures);
delete[] Textures;
Textures = NULL;