From 08cd846000286eb5e07cc8d8cb313aff2d6e7faf Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 1 May 2009 11:06:06 +1000 Subject: [PATCH] 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 --- dix/events.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dix/events.c b/dix/events.c index 6fe218228..e1feb4d61 100644 --- a/dix/events.c +++ b/dix/events.c @@ -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);