It's legal for a buffer-object to have a NULL-resource, but let's just
skip over it, as there's nothing to do.
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
for (i = 0; i < i915->nr_vertex_buffers; i++) {
const void *buf = i915->vertex_buffers[i].is_user_buffer ?
i915->vertex_buffers[i].buffer.user : NULL;
- if (!buf)
- buf = i915_buffer(i915->vertex_buffers[i].buffer.resource)->data;
+ if (!buf) {
+ if (!i915->vertex_buffers[i].buffer.resource)
+ continue;
+ buf = i915_buffer(i915->vertex_buffers[i].buffer.resource)->data;
+ }
draw_set_mapped_vertex_buffer(draw, i, buf, ~0);
}