diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-06-10 10:44:27 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-06-10 10:53:23 +0100 |
commit | ea560e25dfcce3750339b477a1a3c05f504cf91e (patch) | |
tree | 2990a0678c5364d37dc92acc330e648ee75673e4 | |
parent | 1f364c6d241e8971e8fc1447871c718240e4563e (diff) |
sna: Workaround the random free of the ScreenPixmap in fbCloseScreen
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_driver.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/sna/sna_driver.c b/src/sna/sna_driver.c index a02c4d87..60bd53ab 100644 --- a/src/sna/sna_driver.c +++ b/src/sna/sna_driver.c @@ -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); |