diff --git a/dix/gestures.c b/dix/gestures.c index 038bc357c..31179a9f7 100644 --- a/dix/gestures.c +++ b/dix/gestures.c @@ -236,7 +236,7 @@ GestureAddRegularListener(DeviceIntPtr dev, GestureInfoPtr gi, WindowPtr win, In inputMasks = wOtherInputMasks(win); - if (mask & EVENT_XI2_MASK) { + if ((mask & EVENT_XI2_MASK) && (inputMasks != NULL)) { nt_list_for_each_entry(iclients, inputMasks->inputClients, next) { if (!xi2mask_isset(iclients->xi2mask, dev, evtype)) continue;