From 37fd455b21d4825b569a45ffd5d930347a042cea Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Fri, 4 Jan 2013 18:27:21 +0100 Subject: [PATCH] r300g/swtcl: fix crash when setting vertex buffers Broken by e73bf3b805de78299f1a652668ba4e6eab9bac94. --- src/gallium/drivers/r300/r300_state.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c index 050c8f44550..29e28b4dfb1 100644 --- a/src/gallium/drivers/r300/r300_state.c +++ b/src/gallium/drivers/r300/r300_state.c @@ -1659,6 +1659,9 @@ static void r300_set_vertex_buffers_swtcl(struct pipe_context* pipe, buffers, start_slot, count); draw_set_vertex_buffers(r300->draw, start_slot, count, buffers); + if (!buffers) + return; + for (i = 0; i < count; i++) { if (buffers[i].user_buffer) { draw_set_mapped_vertex_buffer(r300->draw, start_slot + i, -- 2.30.2