void *map_buffers[PIPE_MAX_SO_BUFFERS];
assert(num_buffers <= PIPE_MAX_SO_BUFFERS);
+ if (num_buffers > PIPE_MAX_SO_BUFFERS)
+ num_buffers = PIPE_MAX_SO_BUFFERS;
softpipe->dirty |= SP_NEW_SO_BUFFERS;
if (!res) {
/* the whole call is invalid, bail out */
softpipe->so_target.num_buffers = 0;
- draw_set_mapped_so_buffers(softpipe->draw, map_buffers, 0);
+ draw_set_mapped_so_buffers(softpipe->draw, 0, 0);
return;
}