From: Ilia Mirkin Date: Wed, 17 Feb 2016 17:28:04 +0000 (-0500) Subject: meta/copy_image: use precomputed dst_internal_format to avoid segfault X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b697400a97d3137ff87560ebd2c41207b98cd61a;p=mesa.git meta/copy_image: use precomputed dst_internal_format to avoid segfault If the destination is a renderbuffer, dst_tex_image will be NULL. This fixes the *to_renderbuffer dEQP copy image tests. Signed-off-by: Ilia Mirkin Reviewed-by: Jason Ekstrand Cc: mesa-stable@lists.freedesktop.org --- diff --git a/src/mesa/drivers/common/meta_copy_image.c b/src/mesa/drivers/common/meta_copy_image.c index 6534d432e61..57c3f686b0c 100644 --- a/src/mesa/drivers/common/meta_copy_image.c +++ b/src/mesa/drivers/common/meta_copy_image.c @@ -203,7 +203,7 @@ _mesa_meta_CopyImageSubData_uncompressed(struct gl_context *ctx, src_tex_image = wrap_renderbuffer(ctx, src_renderbuffer); } if (!make_view(ctx, src_tex_image, &src_view_tex_image, &src_view_texture, - dst_tex_image->InternalFormat)) + dst_internal_format)) goto cleanup; }