diff options
Diffstat (limited to 'xorg-server/mi/misprite.c')
-rw-r--r-- | xorg-server/mi/misprite.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/xorg-server/mi/misprite.c b/xorg-server/mi/misprite.c index 97bbf8ef5..3ef25e75f 100644 --- a/xorg-server/mi/misprite.c +++ b/xorg-server/mi/misprite.c @@ -474,7 +474,7 @@ miSpriteSourceValidate(DrawablePtr pDrawable, int x, int y, int width, for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { if (DevHasCursor(pDev)) { pCursorInfo = MISPRITE(pDev); - if (pCursorInfo->isUp && pCursorInfo->pScreen == pScreen && + if (pCursorInfo && pCursorInfo->isUp && pCursorInfo->pScreen == pScreen && ORG_OVERLAP(&pCursorInfo->saved, pDrawable->x, pDrawable->y, x, y, width, height)) { SPRITE_DEBUG(("SourceValidate remove\n")); @@ -507,7 +507,7 @@ miSpriteCopyWindow(WindowPtr pWindow, DDXPointRec ptOldOrg, RegionPtr prgnSrc) /* * Damage will take care of destination check */ - if (pCursorInfo->isUp && pCursorInfo->pScreen == pScreen && + if (pCursorInfo && pCursorInfo->isUp && pCursorInfo->pScreen == pScreen && RegionContainsRect(prgnSrc, &pCursorInfo->saved) != rgnOUT) { SPRITE_DEBUG(("CopyWindow remove\n")); miSpriteRemoveCursor(pDev, pScreen); @@ -582,9 +582,12 @@ miSpriteInstallColormap(ColormapPtr pMap) for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { if (DevHasCursor(pDev)) { pCursorInfo = MISPRITE(pDev); - pCursorInfo->checkPixels = TRUE; - if (pCursorInfo->isUp && pCursorInfo->pScreen == pScreen) - miSpriteRemoveCursor(pDev, pScreen); + if (pCursorInfo) + { + pCursorInfo->checkPixels = TRUE; + if (pCursorInfo->isUp && pCursorInfo->pScreen == pScreen) + miSpriteRemoveCursor(pDev, pScreen); + } } } |