aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix/events.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/dix/events.c')
-rw-r--r--xorg-server/dix/events.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/xorg-server/dix/events.c b/xorg-server/dix/events.c
index 03b2d2ea7..ed3138d07 100644
--- a/xorg-server/dix/events.c
+++ b/xorg-server/dix/events.c
@@ -1441,7 +1441,8 @@ UpdateTouchesForGrab(DeviceIntPtr mouse)
listener->type = LISTENER_POINTER_GRAB;
else
listener->type = LISTENER_GRAB;
- FreeGrab(listener->grab);
+ if (listener->grab)
+ FreeGrab(listener->grab);
listener->grab = AllocGrab(grab);
}
}