aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix/grabs.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/dix/grabs.c')
-rw-r--r--xorg-server/dix/grabs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/xorg-server/dix/grabs.c b/xorg-server/dix/grabs.c
index 83e18e263..fe7967415 100644
--- a/xorg-server/dix/grabs.c
+++ b/xorg-server/dix/grabs.c
@@ -179,7 +179,8 @@ UngrabAllDevices(Bool kill_client)
continue;
PrintDeviceGrabInfo(dev);
client = clients[CLIENT_ID(dev->deviceGrab.grab->resource)];
- dev->deviceGrab.DeactivateGrab(dev);
+ if (!kill_client || !client || client->clientGone)
+ dev->deviceGrab.DeactivateGrab(dev);
if (kill_client)
CloseDownClient(client);
}