From: Marek Olšák Date: Fri, 4 Jan 2013 17:27:21 +0000 (+0100) Subject: r300g/swtcl: fix crash when setting vertex buffers X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=37fd455b21d4825b569a45ffd5d930347a042cea;p=mesa.git r300g/swtcl: fix crash when setting vertex buffers Broken by e73bf3b805de78299f1a652668ba4e6eab9bac94. --- 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,