Commit 10750ee0 authored by Gerd Hoffmann's avatar Gerd Hoffmann
Browse files

virtio-gpu: skip update cursor in post_load if we don't have one



If the cursor resource id isn't set the guest didn't define a cursor.
Skip the cursor update in post_load in that that case.

Reported-by: default avatarwanghaibin <wanghaibin.wang@huawei.com>
Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
Tested-by: default avatarwanghaibin <wanghaibin.wang@huawei.com>
Message-id: 20170710070432.856-1-kraxel@redhat.com
Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
parent 6e2c4633
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1092,7 +1092,9 @@ static int virtio_gpu_load(QEMUFile *f, void *opaque, size_t size,

        dpy_gfx_replace_surface(scanout->con, scanout->ds);
        dpy_gfx_update(scanout->con, 0, 0, scanout->width, scanout->height);
        if (scanout->cursor.resource_id) {
            update_cursor(g, &scanout->cursor);
        }
        res->scanout_bitmask |= (1 << i);
    }