summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2016-02-17 12:28:04 -0500
committerIlia Mirkin <[email protected]>2016-02-19 13:10:28 -0500
commitb697400a97d3137ff87560ebd2c41207b98cd61a (patch)
treebb2ccbface462408b768b2475459f3cebdf9ca9f /src
parenta03d6f2aa3bb589ca61c3cc13c4189a973b3a2c1 (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 <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Cc: [email protected]
Diffstat (limited to 'src')
-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 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;
}