diff options
author | Peter Hutterer <peter@cs.unisa.edu.au> | 2008-06-05 15:29:35 +0930 |
---|---|---|
committer | Peter Hutterer <peter@cs.unisa.edu.au> | 2008-06-05 16:14:34 +0930 |
commit | d25ffcfbfcfe8e059f2889873c9dbe76a28ad00c (patch) | |
tree | a832325d374d505e7ea5b4a1cb3994b179f9d479 /mi | |
parent | 874dcdb3bdb9320aae252d3c7927d412685059d5 (diff) |
mi: protect against possible NULL-pointer dereference.
Diffstat (limited to 'mi')
-rw-r--r-- | mi/misprite.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mi/misprite.c b/mi/misprite.c index 25f6b6f8c..b8df5eb54 100644 --- a/mi/misprite.c +++ b/mi/misprite.c @@ -460,7 +460,7 @@ miSpriteBlockHandler (int i, pointer blockData, pointer pTimeout, pPriv = (miSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates, miSpriteScreenKey); SCREEN_PROLOGUE(pScreen, BlockHandler); - + (*pScreen->BlockHandler) (i, blockData, pTimeout, pReadmask); SCREEN_EPILOGUE(pScreen, BlockHandler); @@ -470,8 +470,8 @@ miSpriteBlockHandler (int i, pointer blockData, pointer pTimeout, if (DevHasCursor(pDev)) { pCursorInfo = MISPRITE(pDev); - if (!pCursorInfo->isUp - && pCursorInfo->pScreen == pScreen + if (pCursorInfo && !pCursorInfo->isUp + && pCursorInfo->pScreen == pScreen && pCursorInfo->shouldBeUp) { SPRITE_DEBUG (("BlockHandler restore\n")); @@ -484,8 +484,8 @@ miSpriteBlockHandler (int i, pointer blockData, pointer pTimeout, if (DevHasCursor(pDev)) { pCursorInfo = MISPRITE(pDev); - if (!pCursorInfo->isUp && - pCursorInfo->pScreen == pScreen && + if (pCursorInfo && !pCursorInfo->isUp && + pCursorInfo->pScreen == pScreen && pCursorInfo->shouldBeUp) { SPRITE_DEBUG (("BlockHandler restore\n")); |