diff options
author | José Fonseca <[email protected]> | 2012-11-05 11:18:07 +0000 |
---|---|---|
committer | José Fonseca <[email protected]> | 2012-11-05 11:18:07 +0000 |
commit | 3700bd115841958cc9c211475d3069298e4ff266 (patch) | |
tree | cb8769809e384c5094b2f363dbd7d4cabcf692cb /src/gallium/drivers/trace/tr_context.c | |
parent | 99c45c5aa4b60e1fd55ff4fde6ff6d1a391987d9 (diff) |
trace: Prevent segfault when passing NULL to set_vertex_buffers.
State tracker now passes NULL buffer array to unbind buffers.
Diffstat (limited to 'src/gallium/drivers/trace/tr_context.c')
-rw-r--r-- | src/gallium/drivers/trace/tr_context.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/trace/tr_context.c b/src/gallium/drivers/trace/tr_context.c index ba1882ea652..fed95c62a5c 100644 --- a/src/gallium/drivers/trace/tr_context.c +++ b/src/gallium/drivers/trace/tr_context.c @@ -1077,7 +1077,7 @@ trace_context_set_vertex_buffers(struct pipe_context *_pipe, trace_dump_struct_array(vertex_buffer, buffers, num_buffers); trace_dump_arg_end(); - if (num_buffers) { + if (buffers) { struct pipe_vertex_buffer *_buffers = MALLOC(num_buffers * sizeof(*_buffers)); memcpy(_buffers, buffers, num_buffers * sizeof(*_buffers)); for (i = 0; i < num_buffers; i++) |