diff options
Diffstat (limited to 'src/mesa/state_tracker/st_draw.c')
-rw-r--r-- | src/mesa/state_tracker/st_draw.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c index 957fcfd410e..2ad679b1cb8 100644 --- a/src/mesa/state_tracker/st_draw.c +++ b/src/mesa/state_tracker/st_draw.c @@ -106,9 +106,10 @@ setup_index_buffer(struct st_context *st, } else if (st->indexbuf_uploader) { /* upload indexes from user memory into a real buffer */ - if (u_upload_data(st->indexbuf_uploader, 0, - ib->count * ibuffer->index_size, ib->ptr, - &ibuffer->offset, &ibuffer->buffer) != PIPE_OK) { + u_upload_data(st->indexbuf_uploader, 0, + ib->count * ibuffer->index_size, ib->ptr, + &ibuffer->offset, &ibuffer->buffer); + if (!ibuffer->buffer) { /* out of memory */ return FALSE; } |