diff options
author | Brian Paul <[email protected]> | 2013-01-24 14:51:05 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2013-01-25 15:41:40 -0700 |
commit | 8c3f9ea07392177b6de9d946d40f97128fa51632 (patch) | |
tree | 17fbe09d0959a982397faac29a0ebc4fa62cbf73 /src/mesa/state_tracker/st_cb_clear.c | |
parent | 68a097596efdf314ec60487a1761cac789ae2367 (diff) |
st/mesa: do proper error checking for u_upload_alloc() calls
We weren't properly checking the return value of these calls (and
calls to u_upload_data()) to detect OOM errors.
Note: This is a candidate for the 9.0 branch.
Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_cb_clear.c')
-rw-r--r-- | src/mesa/state_tracker/st_cb_clear.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mesa/state_tracker/st_cb_clear.c b/src/mesa/state_tracker/st_cb_clear.c index d01236e2806..a5aa8f49602 100644 --- a/src/mesa/state_tracker/st_cb_clear.c +++ b/src/mesa/state_tracker/st_cb_clear.c @@ -141,9 +141,8 @@ draw_quad(struct st_context *st, GLuint i, offset; float (*vertices)[2][4]; /**< vertex pos + color */ - u_upload_alloc(st->uploader, 0, 4 * sizeof(vertices[0]), &offset, &vbuf, - (void**)&vertices); - if (!vbuf) { + if (u_upload_alloc(st->uploader, 0, 4 * sizeof(vertices[0]), + &offset, &vbuf, (void **) &vertices) != PIPE_OK) { return; } |