[Mesa-stable] [PATCH] meta/copy_image: use precomputed dst_internal_format to avoid segfault

Ilia Mirkin imirkin at alum.mit.edu
Wed Feb 17 17:30:10 UTC 2016


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 <imirkin at alum.mit.edu>
Cc: mesa-stable at lists.freedesktop.org
---
 src/mesa/drivers/common/meta_copy_image.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/drivers/common/meta_copy_image.c b/src/mesa/drivers/common/meta_copy_image.c
index 6534d43..57c3f68 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;
    }
 
-- 
2.4.10



More information about the mesa-stable mailing list