diff --git a/Xext/saver.c b/Xext/saver.c index a91bc0aed..60b250fdd 100644 --- a/Xext/saver.c +++ b/Xext/saver.c @@ -277,10 +277,13 @@ setEventMask(ScreenPtr pScreen, ClientPtr client, unsigned long mask) static void FreeAttrs(ScreenSaverAttrPtr pAttr) { + PixmapPtr pPixmap; CursorPtr pCursor; - dixDestroyPixmap(pAttr->pBackgroundPixmap, 0); - dixDestroyPixmap(pAttr->pBorderPixmap, 0); + if ((pPixmap = pAttr->pBackgroundPixmap) != 0) + (*pPixmap->drawable.pScreen->DestroyPixmap) (pPixmap); + if ((pPixmap = pAttr->pBorderPixmap) != 0) + (*pPixmap->drawable.pScreen->DestroyPixmap) (pPixmap); if ((pCursor = pAttr->pCursor) != 0) FreeCursor(pCursor, (Cursor) 0); }