From: Marek Olšák Date: Thu, 10 Sep 2015 15:54:41 +0000 (+0200) Subject: gallium/radeon: handle buffer alloc failures in r600_draw_rectangle X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f95e695059c428a21a1e1a27d5cd5ccce2a97b0e;p=mesa.git gallium/radeon: handle buffer alloc failures in r600_draw_rectangle Cc: 11.0 Acked-by: Christian König Reviewed-by: Michel Dänzer --- diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c index 836da76c0bc..d97b721a12f 100644 --- a/src/gallium/drivers/radeon/r600_pipe_common.c +++ b/src/gallium/drivers/radeon/r600_pipe_common.c @@ -78,6 +78,9 @@ void r600_draw_rectangle(struct blitter_context *blitter, * I guess the 4th one is derived from the first 3. * The vertex specification should match u_blitter's vertex element state. */ u_upload_alloc(rctx->uploader, 0, sizeof(float) * 24, &offset, &buf, (void**)&vb); + if (!buf) + return; + vb[0] = x1; vb[1] = y1; vb[2] = depth;