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 <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
314776eb36
commit
f64254d85e
|
@ -575,13 +575,8 @@ miPointerSetPosition(DeviceIntPtr pDev, int mode, double *screenx,
|
||||||
|
|
||||||
miPointerPtr pPointer;
|
miPointerPtr pPointer;
|
||||||
|
|
||||||
if (!pDev)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
pPointer = MIPOINTER(pDev);
|
pPointer = MIPOINTER(pDev);
|
||||||
pScreen = pPointer->pScreen;
|
pScreen = pPointer->pScreen;
|
||||||
if (!pScreen)
|
|
||||||
return NULL; /* called before ready */
|
|
||||||
|
|
||||||
x = trunc(*screenx);
|
x = trunc(*screenx);
|
||||||
y = trunc(*screeny);
|
y = trunc(*screeny);
|
||||||
|
|
Loading…
Reference in New Issue