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