[Mesa-dev] [PATCH 11/20] mesa/drivers: Add extra null check in blitframebuffer_texture()

Ian Romanick idr at freedesktop.org
Wed May 14 13:17:11 PDT 2014


Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

On 05/14/2014 10:55 AM, Juha-Pekka Heikkila wrote:
> 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>
> ---
>  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 e5a0a9a..c87ebd7 100644
> --- a/src/mesa/drivers/common/meta_blit.c
> +++ b/src/mesa/drivers/common/meta_blit.c
> @@ -425,6 +425,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-dev mailing list