mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
mi: protect against NULL-pointer dereference.
Required by the recent patch to use a NullCursor instead of UndisplayCursor().
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user