Fixed deleting OpenGL textures (patch from boswars upstream)
This commit is contained in:
parent
b283218a5f
commit
b2397c05f2
1 changed files with 7 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue