summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolai Hähnle <nicolai.haehnle@amd.com>2016-04-22 21:57:51 -0500
committerEmil Velikov <emil.l.velikov@gmail.com>2016-05-05 11:47:53 +0100
commit7140f9586046823c392b8d4c59874a121172f7be (patch)
tree3dfc9524f0c8bc30fe81137f83c45026f3cdd5b0
parentcfbdeaf2a0d8c88b929d77412525cd2376133d72 (diff)
radeonsi: correct NULL-pointer check in si_upload_const_buffer
Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Reviewed-by: Marek Olšák <marek.olsak@amd.com> (cherry picked from commit 169ace5636defc032ed2a835b5ea7c55631b930f)
-rw-r--r--src/gallium/drivers/radeonsi/si_descriptors.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c
index 08e34d3f300..b3e792c53aa 100644
--- a/src/gallium/drivers/radeonsi/si_descriptors.c
+++ b/src/gallium/drivers/radeonsi/si_descriptors.c
@@ -470,7 +470,7 @@ void si_upload_const_buffer(struct si_context *sctx, struct r600_resource **rbuf
u_upload_alloc(sctx->b.uploader, 0, size, const_offset,
(struct pipe_resource**)rbuffer, &tmp);
- if (rbuffer)
+ if (*rbuffer)
util_memcpy_cpu_to_le32(tmp, ptr, size);
}