sna: Workaround the random free of the ScreenPixmap in fbCloseScreen

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2011-06-10 10:44:27 +01:00
parent 1f364c6d24
commit ea560e25df
1 changed files with 7 additions and 0 deletions

View File

@ -744,6 +744,13 @@ static Bool sna_close_screen(int scrnIndex, ScreenPtr screen)
xf86_cursors_fini(screen);
/* XXX unhook devPrivate otherwise fbCloseScreen frees it! */
if (sna->front) {
screen->DestroyPixmap(sna->front);
sna->front = NULL;
screen->devPrivate = NULL;
}
screen->CloseScreen = sna->CloseScreen;
(*screen->CloseScreen) (scrnIndex, screen);