summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2014-08-17 01:33:27 +0200
committerMarek Olšák <[email protected]>2014-08-19 12:20:17 +0200
commitb7b1ad9c6c6534757b3f30c493c425b9ffbfcf2e (patch)
tree36f867b1f79eaccd908f435707214774ac7ab4b6 /src
parent4a3f156dd1eda367407464d0123bd18bc140f655 (diff)
rbug: fix crash in set_vertex_buffers
Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/rbug/rbug_context.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/rbug/rbug_context.c b/src/gallium/drivers/rbug/rbug_context.c
index ca945902a33..d6fca2e4af6 100644
--- a/src/gallium/drivers/rbug/rbug_context.c
+++ b/src/gallium/drivers/rbug/rbug_context.c
@@ -758,7 +758,7 @@ rbug_set_vertex_buffers(struct pipe_context *_pipe,
pipe_mutex_lock(rb_pipe->call_mutex);
- 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 = rbug_resource_unwrap(_buffers[i].buffer);