Mesa (master): mesa/drivers: Add extra null check in blitframebuffer_texture()
Tapani Pälli
tpalli at kemper.freedesktop.org
Fri May 30 04:24:01 UTC 2014
Module: Mesa
Branch: master
Commit: 5c9056d37f0143eb4c2fe01365b0e6531378ffac
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5c9056d37f0143eb4c2fe01365b0e6531378ffac
Author: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
Date: Fri Apr 25 11:34:12 2014 +0300
mesa/drivers: Add extra null check in blitframebuffer_texture()
If texObj == NULL here it mean there is already GL_INVALID_VALUE
or GL_OUT_OF_MEMORY error set to context.
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
---
src/mesa/drivers/common/meta_blit.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/mesa/drivers/common/meta_blit.c b/src/mesa/drivers/common/meta_blit.c
index 5929619..f26ef93 100644
--- a/src/mesa/drivers/common/meta_blit.c
+++ b/src/mesa/drivers/common/meta_blit.c
@@ -430,6 +430,9 @@ blitframebuffer_texture(struct gl_context *ctx,
srcLevel = 0;
target = meta_temp_texture->Target;
texObj = _mesa_lookup_texture(ctx, meta_temp_texture->TexObj);
+ if (texObj == NULL) {
+ return false;
+ }
_mesa_meta_setup_copypix_texture(ctx, meta_temp_texture,
srcX0, srcY0,
More information about the mesa-commit
mailing list