dix: freeing a null grab is a bug, complain if doing so

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2013-04-23 15:46:04 +10:00
parent ccfa0f2d5d
commit 4980bcef99

View File

@ -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);