From de66207883efc1f32e96907c3e64f17b2bdf6c3e Mon Sep 17 00:00:00 2001 From: Alon Levy Date: Sun, 8 Jul 2012 14:05:08 +0300 Subject: qxl_driver/qxl_switch_mode: destroy is not idempotent --- src/qxl_driver.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/qxl_driver.c b/src/qxl_driver.c index a6d7636..e4c477a 100644 --- a/src/qxl_driver.c +++ b/src/qxl_driver.c @@ -701,10 +701,9 @@ qxl_switch_mode(SWITCH_MODE_ARGS_DECL) { qxl_surface_kill (qxl->primary); qxl_surface_cache_sanity_check (qxl->surface_cache); + qxl_io_destroy_primary(qxl); } - qxl_io_destroy_primary(qxl); - qxl->primary = qxl_surface_cache_create_primary (qxl->surface_cache, m); qxl->current_mode = m; qxl->bytes_per_pixel = (qxl->pScrn->bitsPerPixel + 7) / 8; -- cgit v1.2.3