dix: ProcChangeActivePointerGrab: make sure variable is initialised.

Thanks to Ben Close for spotting it.
This commit is contained in:
Peter Hutterer 2007-08-20 10:06:13 +09:30
parent 14d0397cde
commit 2c1431a76e
1 changed files with 6 additions and 2 deletions

View File

@ -4808,7 +4808,7 @@ int
ProcChangeActivePointerGrab(ClientPtr client)
{
DeviceIntPtr device, grabbed;
GrabPtr grab = device->deviceGrab.grab;
GrabPtr grab;
CursorPtr newCursor, oldCursor;
REQUEST(xChangeActivePointerGrabReq);
TimeStamp time;
@ -4831,7 +4831,11 @@ ProcChangeActivePointerGrab(ClientPtr client)
return BadCursor;
}
}
if (!grab && !SameClient(grab, client))
device = PickPointer(client);
grab = device->deviceGrab.grab;
if (!grab || !SameClient(grab, client))
{
/* no grab on ClientPointer, or some other client has a grab on our
* ClientPointer, let's check if we have a pointer grab on some other