diff options
author | Peter Hutterer <peter@cs.unisa.edu.au> | 2008-05-14 09:42:50 +0930 |
---|---|---|
committer | Peter Hutterer <peter@cs.unisa.edu.au> | 2008-05-14 09:42:50 +0930 |
commit | a6659291c798f417a76d9aa7944694ff27c01fa7 (patch) | |
tree | c1ff40cbfe0df4f6f88e96e66aa68bd82b04255a /mi/mipointer.c | |
parent | dc3aba8a559d4304844ee1cc306c577a63b82762 (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.c | 4 |
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); } |