diff options
| -rw-r--r-- | backends/graphics/opengl/gltexture.cpp | 4 | 
1 files changed, 4 insertions, 0 deletions
diff --git a/backends/graphics/opengl/gltexture.cpp b/backends/graphics/opengl/gltexture.cpp index 843ec2d2b3..cd9e23cb71 100644 --- a/backends/graphics/opengl/gltexture.cpp +++ b/backends/graphics/opengl/gltexture.cpp @@ -141,6 +141,10 @@ void GLTexture::allocBuffer(GLuint w, GLuint h) {  }  void GLTexture::updateBuffer(const void *buf, int pitch, GLuint x, GLuint y, GLuint w, GLuint h) { +	// Skip empty updates. +	if (w * h == 0) +		return; +  	// Select this OpenGL texture  	glBindTexture(GL_TEXTURE_2D, _textureName); CHECK_GL_ERROR();  | 
