diff options
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/main/genmipmap.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/main/genmipmap.c b/src/mesa/main/genmipmap.c index c952c4fda54..97d3c62b7bb 100644 --- a/src/mesa/main/genmipmap.c +++ b/src/mesa/main/genmipmap.c @@ -149,6 +149,11 @@ _mesa_generate_texture_mipmap(struct gl_context *ctx, return; } + if (srcImage->Width == 0 || srcImage->Height == 0) { + _mesa_unlock_texture(ctx, texObj); + return; + } + if (target == GL_TEXTURE_CUBE_MAP) { GLuint face; for (face = 0; face < 6; face++) { |