vrend: Don't try to copy to res->iov if there is none

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
macos/master
Gert Wollny 4 years ago committed by Gert Wollny
parent 18b4bfc6f9
commit cbc5616377
  1. 4
      src/vrend_renderer.c

@ -7303,8 +7303,8 @@ static int vrend_renderer_transfer_write_iov(struct vrend_context *ctx,
{
void *data;
if (is_only_bit(res->storage_bits, VREND_STORAGE_GUEST_MEMORY) ||
(has_bit(res->storage_bits, VREND_STORAGE_HOST_SYSTEM_MEMORY) && res->iov)) {
if ((is_only_bit(res->storage_bits, VREND_STORAGE_GUEST_MEMORY) ||
has_bit(res->storage_bits, VREND_STORAGE_HOST_SYSTEM_MEMORY)) && res->iov) {
return vrend_copy_iovec(iov, num_iovs, info->offset,
res->iov, res->num_iovs, info->box->x,
info->box->width, res->ptr);

Loading…
Cancel
Save