dix: only free the old cursor if the grab was successful.

Testcase: start thunderbird and move a message around, crashes after two or
three moves.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2009-05-01 11:06:06 +10:00
parent 3d30789a05
commit 08cd846000

View File

@ -4446,7 +4446,7 @@ ProcGrabPointer(ClientPtr client)
if (rc != Success)
return rc;
if (oldCursor)
if (oldCursor && rep.status == GrabSuccess)
FreeCursor (oldCursor, (Cursor)0);
time = ClientTimeToServerTime(stuff->time);