summaryrefslogtreecommitdiff
path: root/mi/mipointer.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter@cs.unisa.edu.au>2008-05-14 09:42:50 +0930
committerPeter Hutterer <peter@cs.unisa.edu.au>2008-05-14 09:42:50 +0930
commita6659291c798f417a76d9aa7944694ff27c01fa7 (patch)
treec1ff40cbfe0df4f6f88e96e66aa68bd82b04255a /mi/mipointer.c
parentdc3aba8a559d4304844ee1cc306c577a63b82762 (diff)
mi: protect against NULL-pointer dereference.
Required by the recent patch to use a NullCursor instead of UndisplayCursor().
Diffstat (limited to 'mi/mipointer.c')
-rw-r--r--mi/mipointer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mi/mipointer.c b/mi/mipointer.c
index 82439474c..2c226dc71 100644
--- a/mi/mipointer.c
+++ b/mi/mipointer.c
@@ -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);
}