summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlia Mirkin <imirkin@alum.mit.edu>2016-02-17 12:28:04 -0500
committerEmil Velikov <emil.l.velikov@gmail.com>2016-04-11 19:51:20 +0100
commit161a0a9784018ebacbc1788b9a659441e725de15 (patch)
tree0fe2bbc907694c79dec517db3463b913eaded8e4
parent0a7097a17e4c60d5c6e4c4a9866445015ed9a762 (diff)
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 <imirkin@alum.mit.edu> Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com> Cc: mesa-stable@lists.freedesktop.org (cherry picked from commit b697400a97d3137ff87560ebd2c41207b98cd61a)
-rw-r--r--src/mesa/drivers/common/meta_copy_image.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/common/meta_copy_image.c b/src/mesa/drivers/common/meta_copy_image.c
index 04b9cafe308..08d055a9166 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;
}