From 169ace5636defc032ed2a835b5ea7c55631b930f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nicolai=20H=C3=A4hnle?= Date: Fri, 22 Apr 2016 21:57:51 -0500 Subject: [PATCH] radeonsi: correct NULL-pointer check in si_upload_const_buffer MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Cc: "11.1 11.2" Reviewed-by: Bas Nieuwenhuizen Reviewed-by: Marek Olšák --- src/gallium/drivers/radeonsi/si_descriptors.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c index 27f2a7412e6..b48160555f0 100644 --- a/src/gallium/drivers/radeonsi/si_descriptors.c +++ b/src/gallium/drivers/radeonsi/si_descriptors.c @@ -783,7 +783,7 @@ void si_upload_const_buffer(struct si_context *sctx, struct r600_resource **rbuf u_upload_alloc(sctx->b.uploader, 0, size, 256, const_offset, (struct pipe_resource**)rbuffer, &tmp); - if (rbuffer) + if (*rbuffer) util_memcpy_cpu_to_le32(tmp, ptr, size); } -- 2.30.2