From f64254d85e731d0b4369d871a9a735b03f283ba6 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 23 Aug 2012 15:00:24 +1000 Subject: [PATCH] mi: drop two useless conditions in miPointerSetPosition pDev cannot be NULL here since fill_pointer_events is the only caller. And if the screen is NULL, then the device tries to send events before it is fully initialised. That certainly shouldn't happen and would be a bug elsewhere. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard --- mi/mipointer.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/mi/mipointer.c b/mi/mipointer.c index 4defaf5ec..f34506326 100644 --- a/mi/mipointer.c +++ b/mi/mipointer.c @@ -575,13 +575,8 @@ miPointerSetPosition(DeviceIntPtr pDev, int mode, double *screenx, miPointerPtr pPointer; - if (!pDev) - return NULL; - pPointer = MIPOINTER(pDev); pScreen = pPointer->pScreen; - if (!pScreen) - return NULL; /* called before ready */ x = trunc(*screenx); y = trunc(*screeny);