summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2012-11-05 11:05:34 +0000
committerJosé Fonseca <jfonseca@vmware.com>2012-11-05 11:05:34 +0000
commit99c45c5aa4b60e1fd55ff4fde6ff6d1a391987d9 (patch)
tree8516be19c1a6b47d75ee5542f10bd39a173fbaa1
parentf1034e944b95c2889d2dda10189160fccfed78fc (diff)
galahad: Prevent segfault when passing NULL to set_vertex_buffers.
State tracker now passes NULL buffer array to unbind buffers.
-rw-r--r--src/gallium/drivers/galahad/glhd_context.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/galahad/glhd_context.c b/src/gallium/drivers/galahad/glhd_context.c
index ecdfe068f7..53e0b17319 100644
--- a/src/gallium/drivers/galahad/glhd_context.c
+++ b/src/gallium/drivers/galahad/glhd_context.c
@@ -630,7 +630,7 @@ galahad_context_set_vertex_buffers(struct pipe_context *_pipe,
struct pipe_vertex_buffer *buffers = NULL;
unsigned i;
- if (num_buffers) {
+ if (num_buffers && _buffers) {
memcpy(unwrapped_buffers, _buffers, num_buffers * sizeof(*_buffers));
for (i = 0; i < num_buffers; i++)
unwrapped_buffers[i].buffer = galahad_resource_unwrap(_buffers[i].buffer);