From: Ilia Mirkin Date: Sat, 5 Sep 2015 17:11:27 +0000 (-0400) Subject: st/mesa: properly handle u_upload_alloc failure X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bfd3d5244b26aca7696715066f5e5331e0b5fe2a;p=mesa.git st/mesa: properly handle u_upload_alloc failure 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 --- 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; }