Mesa (master): mesa/main: In _mesa_CompressedTextureSubImage3D() check found texObj
Jason Ekstrand
jekstrand at kemper.freedesktop.org
Mon Jan 12 17:56:58 UTC 2015
Module: Mesa
Branch: master
Commit: c503ce104419a7ba39db6a0989a15d888f4b0d36
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c503ce104419a7ba39db6a0989a15d888f4b0d36
Author: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
Date: Mon Jan 12 15:27:24 2015 +0200
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 at gmail.com>
---
src/mesa/main/teximage.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 4fa7f0f..5ada94f 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -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,
More information about the mesa-commit
mailing list