add null pointer checks for listener, dev and ti
This commit is contained in:
parent
23e83724df
commit
99583ddd81
|
@ -1294,13 +1294,13 @@ RetrieveTouchDeliveryData(DeviceIntPtr dev, TouchPointInfoPtr ti,
|
|||
*mask = NULL;
|
||||
*grab = NULL;
|
||||
|
||||
if (listener->type == LISTENER_GRAB ||
|
||||
if (listener && listener->type == LISTENER_GRAB ||
|
||||
listener->type == LISTENER_POINTER_GRAB) {
|
||||
*grab = listener->grab;
|
||||
|
||||
BUG_RETURN_VAL(!*grab, FALSE);
|
||||
}
|
||||
else if (ti->emulate_pointer && dev->deviceGrab.grab &&
|
||||
else if (ti && ti->emulate_pointer && dev && dev->deviceGrab.grab &&
|
||||
!dev->deviceGrab.fromPassiveGrab) {
|
||||
/* There may be an active pointer grab on the device */
|
||||
*grab = dev->deviceGrab.grab;
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
--- exevents.c
|
||||
+++ exevents.c
|
||||
@@ -1294,13 +1294,13 @@ RetrieveTouchDeliveryData(DeviceIntPtr dev, TouchPointInfoPtr ti,
|
||||
*mask = NULL;
|
||||
*grab = NULL;
|
||||
|
||||
- if (listener->type == LISTENER_GRAB ||
|
||||
+ if (listener && listener->type == LISTENER_GRAB ||
|
||||
listener->type == LISTENER_POINTER_GRAB) {
|
||||
*grab = listener->grab;
|
||||
|
||||
BUG_RETURN_VAL(!*grab, FALSE);
|
||||
}
|
||||
- else if (ti->emulate_pointer && dev->deviceGrab.grab &&
|
||||
+ else if (ti && ti->emulate_pointer && dev && dev->deviceGrab.grab &&
|
||||
!dev->deviceGrab.fromPassiveGrab) {
|
||||
/* There may be an active pointer grab on the device */
|
||||
*grab = dev->deviceGrab.grab;
|
Loading…
Reference in New Issue