xtest: Check whether there is a sendEventsProc to call
If a client tries to send XTEST events while there is no sendEventsProc defined for the given device, Xwayland would call into 0x0 and crash. Make sure the handler is defined before trying to use it, to avoid the crash. Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1574
This commit is contained in:
parent
94945a5274
commit
e820030de2
|
@ -437,7 +437,8 @@ ProcXTestFakeInput(ClientPtr client)
|
|||
|
||||
valuator_mask_set_range(&mask, firstValuator, numValuators, valuators);
|
||||
|
||||
(*dev->sendEventsProc) (dev, type, ev->u.u.detail, flags, &mask);
|
||||
if (dev->sendEventsProc)
|
||||
(*dev->sendEventsProc) (dev, type, ev->u.u.detail, flags, &mask);
|
||||
|
||||
if (need_ptr_update)
|
||||
miPointerUpdateSprite(dev);
|
||||
|
|
Loading…
Reference in New Issue