summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/common
diff options
context:
space:
mode:
authorJuha-Pekka Heikkila <juhapekka.heikkila@gmail.com>2014-04-25 11:34:12 +0300
committerTapani Pälli <tapani.palli@intel.com>2014-05-30 07:21:39 +0300
commit5c9056d37f0143eb4c2fe01365b0e6531378ffac (patch)
tree078365ec29323da3607173d2a11eeda11c67042a /src/mesa/drivers/common
parent19f1d137f8d5edbbdef4e78186b21a7a5bd08d18 (diff)
downloadexternal_mesa3d-5c9056d37f0143eb4c2fe01365b0e6531378ffac.zip
external_mesa3d-5c9056d37f0143eb4c2fe01365b0e6531378ffac.tar.gz
external_mesa3d-5c9056d37f0143eb4c2fe01365b0e6531378ffac.tar.bz2
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@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Diffstat (limited to 'src/mesa/drivers/common')
-rw-r--r--src/mesa/drivers/common/meta_blit.c3
1 files changed, 3 insertions, 0 deletions
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,