diff --git a/dix/grabs.c b/dix/grabs.c index 3b02352df..0a2111d8a 100644 --- a/dix/grabs.c +++ b/dix/grabs.c @@ -249,6 +249,8 @@ CreateGrab(int client, DeviceIntPtr device, DeviceIntPtr modDevice, void FreeGrab(GrabPtr pGrab) { + BUG_RETURN(!pGrab); + if (pGrab->grabtype == XI2 && pGrab->type == XI_TouchBegin) TouchListenerGone(pGrab->resource);