st/mesa: properly handle u_upload_alloc failure
authorIlia Mirkin <imirkin@alum.mit.edu>
Sat, 5 Sep 2015 17:11:27 +0000 (13:11 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Sun, 6 Sep 2015 15:32:07 +0000 (11:32 -0400)
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 <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/mesa/state_tracker/st_cb_bitmap.c

index ce593a94593d7b2eac7895f52c1d2812cf48b6b3..230eba8c4a5af07b56cbbd1b9af66459f51bd0f7 100644 (file)
@@ -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;
    }