mesa/main: In _mesa_CompressedTextureSubImage3D() check found texObj

Check returned texObj is not null. If texObj is null there is already
GL_INVALID_OPERATION error set.

Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
This commit is contained in:
Juha-Pekka Heikkila 2015-01-12 15:27:24 +02:00 committed by Jason Ekstrand
parent 457d40e9e8
commit c503ce1044
1 changed files with 2 additions and 0 deletions

View File

@ -4732,6 +4732,8 @@ _mesa_CompressedTextureSubImage3D(GLuint texture, GLint level, GLint xoffset,
texObj = _mesa_lookup_texture_err(ctx, texture,
"glCompressedTextureSubImage3D");
if (!texObj)
return;
_mesa_compressed_texture_sub_image(ctx, 3, texObj, texObj->Target, level,
xoffset, yoffset, zoffset,