aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/texgetimage.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-01-20 09:41:09 +0100
committermarha <marha@users.sourceforge.net>2012-01-20 09:41:09 +0100
commitc5f912c7b9248440bf9dff4b3c64513ec0f3ec98 (patch)
tree7986b288489dac6a8a70787dbdedfc0c064a0c02 /mesalib/src/mesa/main/texgetimage.c
parent27bec2ba601ec12334e6b7564034f87ab7c9522b (diff)
parenta8ef69cc0c9e5281e6b745dd4a2be75f629eb8b8 (diff)
downloadvcxsrv-c5f912c7b9248440bf9dff4b3c64513ec0f3ec98.tar.gz
vcxsrv-c5f912c7b9248440bf9dff4b3c64513ec0f3ec98.tar.bz2
vcxsrv-c5f912c7b9248440bf9dff4b3c64513ec0f3ec98.zip
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'mesalib/src/mesa/main/texgetimage.c')
-rw-r--r--mesalib/src/mesa/main/texgetimage.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/mesalib/src/mesa/main/texgetimage.c b/mesalib/src/mesa/main/texgetimage.c
index f848aa89d..8c85c1e54 100644
--- a/mesalib/src/mesa/main/texgetimage.c
+++ b/mesalib/src/mesa/main/texgetimage.c
@@ -837,6 +837,9 @@ _mesa_GetnTexImageARB( GLenum target, GLint level, GLenum format,
texObj = _mesa_get_current_tex_object(ctx, target);
texImage = _mesa_select_tex_image(ctx, texObj, target, level);
+ if (_mesa_is_zero_size_texture(texImage))
+ return;
+
if (MESA_VERBOSE & (VERBOSE_API | VERBOSE_TEXTURE)) {
_mesa_debug(ctx, "glGetTexImage(tex %u) format = %s, w=%d, h=%d,"
" dstFmt=0x%x, dstType=0x%x\n",
@@ -970,6 +973,9 @@ _mesa_GetnCompressedTexImageARB(GLenum target, GLint level, GLsizei bufSize,
texObj = _mesa_get_current_tex_object(ctx, target);
texImage = _mesa_select_tex_image(ctx, texObj, target, level);
+ if (_mesa_is_zero_size_texture(texImage))
+ return;
+
if (MESA_VERBOSE & (VERBOSE_API | VERBOSE_TEXTURE)) {
_mesa_debug(ctx,
"glGetCompressedTexImage(tex %u) format = %s, w=%d, h=%d\n",