diff options
author | Tiago Vignatti <tiago.vignatti@nokia.com> | 2010-04-16 18:35:55 +0300 |
---|---|---|
committer | Tiago Vignatti <tiago.vignatti@nokia.com> | 2010-04-21 18:07:08 +0300 |
commit | 099946a3ac94ff5e575e9edcecd26cf9f346b241 (patch) | |
tree | 52e2202d24914905e661ec366461db548cecd3ef | |
parent | 49835eec0c996ad95a01f0fe340336b6b60e51aa (diff) |
mi: check for NULL pointer before dereferences it in miPointerSetPosition
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | mi/mipointer.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mi/mipointer.c b/mi/mipointer.c index e1f63be4e..1b33f82d5 100644 --- a/mi/mipointer.c +++ b/mi/mipointer.c @@ -497,14 +497,14 @@ miPointerSetPosition(DeviceIntPtr pDev, int *x, int *y) miPointerPtr pPointer; + if (!pDev || !pDev->coreEvents) + return; + pPointer = MIPOINTER(pDev); pScreen = pPointer->pScreen; if (!pScreen) return; /* called before ready */ - if (!pDev || !pDev->coreEvents) - return; - if (*x < 0 || *x >= pScreen->width || *y < 0 || *y >= pScreen->height) { pScreenPriv = GetScreenPrivate (pScreen); |