From 5030540d6cd2aa9bbd4ecb7f4487616f9ef0140a Mon Sep 17 00:00:00 2001 From: Jamey Sharp Date: Thu, 27 May 2010 11:50:52 -0700 Subject: [PATCH] midispcur: Add comment explaining why pRootPicture must not be freed. Signed-off-by: Jamey Sharp Cc: Peter Hutterer Acked-by: Peter Hutterer --- mi/midispcur.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mi/midispcur.c b/mi/midispcur.c index 59923c875..c279010e6 100644 --- a/mi/midispcur.c +++ b/mi/midispcur.c @@ -569,6 +569,12 @@ miDCDeviceCleanup(DeviceIntPtr pDev, ScreenPtr pScreen) if (pBuffer->pSaveGC) FreeGC(pBuffer->pSaveGC, (GContext) 0); if (pBuffer->pRestoreGC) FreeGC(pBuffer->pRestoreGC, (GContext) 0); +#ifdef ARGB_CURSOR + /* If a pRootPicture was allocated for a root window, it + * is freed when that root window is destroyed, so don't + * free it again here. */ +#endif + if (pBuffer->pSave) (*pScreen->DestroyPixmap)(pBuffer->pSave); free(pBuffer);