From: Juha-Pekka Heikkila Date: Fri, 25 Apr 2014 08:34:12 +0000 (+0300) Subject: mesa/drivers: Add extra null check in blitframebuffer_texture() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5c9056d37f0143eb4c2fe01365b0e6531378ffac;p=mesa.git 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 Reviewed-by: Ian Romanick --- diff --git a/src/mesa/drivers/common/meta_blit.c b/src/mesa/drivers/common/meta_blit.c index 5929619f309..f26ef93c1b9 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,