diff options
Diffstat (limited to 'src/qxl_driver.c')
-rw-r--r-- | src/qxl_driver.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/qxl_driver.c b/src/qxl_driver.c index 4dc362b..226c331 100644 --- a/src/qxl_driver.c +++ b/src/qxl_driver.c @@ -312,12 +312,6 @@ qxl_close_screen(int scrnIndex, ScreenPtr pScreen) qxl_screen_t *qxl = pScrn->driverPrivate; Bool result; - if (pScrn->vtSema) { - qxl_restore_state(pScrn); - qxl_unmap_memory(qxl, scrnIndex); - } - pScrn->vtSema = FALSE; - ErrorF ("Freeing %p\n", qxl->fb); free(qxl->fb); qxl->fb = NULL; @@ -329,6 +323,12 @@ qxl_close_screen(int scrnIndex, ScreenPtr pScreen) result = pScreen->CloseScreen(scrnIndex, pScreen); + if (pScrn->vtSema) { + qxl_restore_state(pScrn); + qxl_unmap_memory(qxl, scrnIndex); + } + pScrn->vtSema = FALSE; + return result; } |