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; void *data;
if (is_only_bit(res->storage_bits, VREND_STORAGE_GUEST_MEMORY) || if ((is_only_bit(res->storage_bits, VREND_STORAGE_GUEST_MEMORY) ||
(has_bit(res->storage_bits, VREND_STORAGE_HOST_SYSTEM_MEMORY) && res->iov)) { has_bit(res->storage_bits, VREND_STORAGE_HOST_SYSTEM_MEMORY)) && res->iov) {
return vrend_copy_iovec(iov, num_iovs, info->offset, return vrend_copy_iovec(iov, num_iovs, info->offset,
res->iov, res->num_iovs, info->box->x, res->iov, res->num_iovs, info->box->x,
info->box->width, res->ptr); info->box->width, res->ptr);

Loading…
Cancel
Save