summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2015-09-05 13:11:27 -0400
committerIlia Mirkin <[email protected]>2015-09-06 11:32:07 -0400
commitbfd3d5244b26aca7696715066f5e5331e0b5fe2a (patch)
treebafc3b646974a3532bb6dead0503c724cca8a7f8
parenta778831735ea45f789c247c40677cd26adc78e3e (diff)
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 <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
-rw-r--r--src/mesa/state_tracker/st_cb_bitmap.c2
1 files changed, 1 insertions, 1 deletions
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;
}