From bfd3d5244b26aca7696715066f5e5331e0b5fe2a Mon Sep 17 00:00:00 2001 From: Ilia Mirkin Date: Sat, 5 Sep 2015 13:11:27 -0400 Subject: [PATCH] st/mesa: properly handle u_upload_alloc failure MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit vbuf is never null. We want to make sure that a resource was allocated for the vbuf, which is *vbuf. Signed-off-by: Ilia Mirkin Reviewed-by: Marek Olšák --- src/mesa/state_tracker/st_cb_bitmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/state_tracker/st_cb_bitmap.c b/src/mesa/state_tracker/st_cb_bitmap.c index ce593a94593..230eba8c4a5 100644 --- a/src/mesa/state_tracker/st_cb_bitmap.c +++ b/src/mesa/state_tracker/st_cb_bitmap.c @@ -351,7 +351,7 @@ setup_bitmap_vertex_data(struct st_context *st, bool normalized, u_upload_alloc(st->uploader, 0, 4 * sizeof(vertices[0]), vbuf_offset, vbuf, (void **) &vertices); - if (!vbuf) { + if (!*vbuf) { return; } -- 2.30.2