[PATCH 17/24] dix: freeing a null grab is a bug, complain if doing so

Peter Hutterer peter.hutterer at who-t.net
Thu May 9 22:30:52 PDT 2013


Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 dix/grabs.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/dix/grabs.c b/dix/grabs.c
index 3b02352..0a2111d 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);
 
-- 
1.8.1.4



More information about the xorg-devel mailing list