From f95e695059c428a21a1e1a27d5cd5ccce2a97b0e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Thu, 10 Sep 2015 17:54:41 +0200 Subject: [PATCH] gallium/radeon: handle buffer alloc failures in r600_draw_rectangle MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Cc: 11.0 Acked-by: Christian König Reviewed-by: Michel Dänzer --- src/gallium/drivers/radeon/r600_pipe_common.c | 3 +++ 1 file changed, 3 insertions(+) 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; -- 2.30.2