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>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
unsigned size = vb->stride ? num_vertices * vb->stride
: sizeof(double)*4;
+ if (!vb->buffer.resource)
+ continue;
+
if (offset + size > vb->buffer.resource->width0) {
/* Don't try to map past end of buffer. This often happens when
* we're translating an attribute that's at offset > 0 from the