diff options
Diffstat (limited to 'src/mesa/main/texgetimage.c')
-rw-r--r-- | src/mesa/main/texgetimage.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c index 0287ebfcda3..9411db81614 100644 --- a/src/mesa/main/texgetimage.c +++ b/src/mesa/main/texgetimage.c @@ -1101,6 +1101,8 @@ _mesa_GetTextureImage(GLuint texture, GLint level, GLenum format, /* Copy each face. */ for (i = 0; i < 6; ++i) { texImage = texObj->Image[i][level]; + assert(texImage); + _mesa_get_texture_image(ctx, texObj, texImage, texObj->Target, level, format, type, bufSize, pixels, true); @@ -1306,8 +1308,7 @@ _mesa_GetCompressedTextureImage(GLuint texture, GLint level, /* Copy each face. */ for (i = 0; i < 6; ++i) { texImage = texObj->Image[i][level]; - if (!texImage) - return; + assert(texImage); _mesa_get_compressed_texture_image(ctx, texObj, texImage, texObj->Target, level, |