mi: protect against NULL-pointer dereference.

Required by the recent patch to use a NullCursor instead of UndisplayCursor().
This commit is contained in:
Peter Hutterer 2008-05-14 09:42:50 +09:30
parent dc3aba8a55
commit a6659291c7

View File

@ -357,7 +357,7 @@ miPointerWarpCursor (pDev, pScreen, x, y)
{
pPointer->devx = x;
pPointer->devy = y;
if(!pPointer->pCursor->bits->emptyMask)
if(pPointer->pCursor && !pPointer->pCursor->bits->emptyMask)
(*pScreenPriv->spriteFuncs->MoveCursor) (pDev, pScreen, x, y);
}
pPointer->x = x;
@ -541,7 +541,7 @@ miPointerMoved (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y,
{
pPointer->devx = x;
pPointer->devy = y;
if(!pPointer->pCursor->bits->emptyMask)
if(pPointer->pCursor && !pPointer->pCursor->bits->emptyMask)
(*pScreenPriv->spriteFuncs->MoveCursor) (pDev, pScreen, x, y);
}