[PATCH] mi: drop two useless conditions in miPointerSetPosition
Peter Hutterer
peter.hutterer at who-t.net
Wed Aug 22 22:09:01 PDT 2012
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 <peter.hutterer at who-t.net>
---
mi/mipointer.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/mi/mipointer.c b/mi/mipointer.c
index 4defaf5..f345063 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);
--
1.7.11.2
More information about the xorg-devel
mailing list