summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2013-01-04 18:27:21 +0100
committerMarek Olšák <[email protected]>2013-01-04 21:08:28 +0100
commit37fd455b21d4825b569a45ffd5d930347a042cea (patch)
tree4a3dfe748e7d1201fc73f09f12b29a063aca76b4 /src
parentd4ff72b9447dcff29c51bcb8b037eb4a53bcc040 (diff)
r300g/swtcl: fix crash when setting vertex buffers
Broken by e73bf3b805de78299f1a652668ba4e6eab9bac94.
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/r300/r300_state.c3
1 files changed, 3 insertions, 0 deletions
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,