mesa/drivers: Add extra null check in blitframebuffer_texture()
authorJuha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Fri, 25 Apr 2014 08:34:12 +0000 (11:34 +0300)
committerTapani Pälli <tapani.palli@intel.com>
Fri, 30 May 2014 04:21:39 +0000 (07:21 +0300)
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>
src/mesa/drivers/common/meta_blit.c

index 5929619f309ef0cbc578bb3f94099b8f7f900d20..f26ef93c1b9261db5f262fd550ea06640b4c469d 100644 (file)
@@ -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,