summaryrefslogtreecommitdiff
path: root/uxa/uxa.c
diff options
context:
space:
mode:
Diffstat (limited to 'uxa/uxa.c')
-rw-r--r--uxa/uxa.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/uxa/uxa.c b/uxa/uxa.c
index 4a5907e8..3c81a851 100644
--- a/uxa/uxa.c
+++ b/uxa/uxa.c
@@ -385,12 +385,15 @@ static Bool uxa_close_screen(int i, ScreenPtr pScreen)
uxa_glyphs_fini(pScreen);
- /* Destroy the pixmap created by miScreenInit() *before* chaining up as
- * we finalize ourselves here and so this is the last chance we have of
- * releasing our resources associated with the Pixmap. So do it first.
- */
- (void) (*pScreen->DestroyPixmap) (pScreen->devPrivate);
- pScreen->devPrivate = NULL;
+ if (pScreen->devPrivate) {
+ /* Destroy the pixmap created by miScreenInit() *before*
+ * chaining up as we finalize ourselves here and so this
+ * is the last chance we have of releasing our resources
+ * associated with the Pixmap. So do it first.
+ */
+ (void) (*pScreen->DestroyPixmap) (pScreen->devPrivate);
+ pScreen->devPrivate = NULL;
+ }
pScreen->CreateGC = uxa_screen->SavedCreateGC;
pScreen->CloseScreen = uxa_screen->SavedCloseScreen;