summaryrefslogtreecommitdiff
path: root/hw/qxl.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/qxl.c')
-rw-r--r--hw/qxl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/qxl.c b/hw/qxl.c
index fbaadde256..6ed61beea4 100644
--- a/hw/qxl.c
+++ b/hw/qxl.c
@@ -1782,7 +1782,7 @@ static void qxl_hw_screen_dump(void *opaque, const char *filename, bool cswitch,
case QXL_MODE_COMPAT:
case QXL_MODE_NATIVE:
qxl_render_update(qxl);
- ppm_save(filename, qxl->ssd.ds->surface, errp);
+ ppm_save(filename, qxl->ssd.ds, errp);
break;
case QXL_MODE_VGA:
vga->screen_dump(vga, filename, cswitch, errp);
@@ -1881,6 +1881,7 @@ static void display_switch(DisplayChangeListener *dcl,
{
PCIQXLDevice *qxl = container_of(dcl, PCIQXLDevice, ssd.dcl);
+ qxl->ssd.ds = surface;
if (qxl->mode == QXL_MODE_VGA) {
qemu_spice_display_switch(&qxl->ssd, surface);
}