dix: ProcUngrabKeyboard: make sure grab is initialized.

This should fix the random segfaults with ProcUngrabKeyboard.

Thanks to David Nolden for spotting it.
This commit is contained in:
Peter Hutterer 2007-08-15 22:12:29 +09:30
parent f367285fd5
commit 14d0397cde

View File

@ -5139,6 +5139,8 @@ ProcUngrabKeyboard(ClientPtr client)
REQUEST_SIZE_MATCH(xResourceReq);
UpdateCurrentTime();
grab = device->deviceGrab.grab;
if (!grab || !grab->coreGrab || !SameClient(grab, client))
{
for (grabbed = inputInfo.devices; grabbed; grabbed = grabbed->next)