radeonsi: correct NULL-pointer check in si_upload_const_buffer
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Sat, 23 Apr 2016 02:57:51 +0000 (21:57 -0500)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Mon, 2 May 2016 16:37:55 +0000 (11:37 -0500)
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>
src/gallium/drivers/radeonsi/si_descriptors.c

index 27f2a7412e69a45c93d23ac50c3261b07835ba3a..b48160555f0c03831778e45ebbaacd10cbdafe11 100644 (file)
@@ -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);
 }