diff --git a/dix/dispatch.c b/dix/dispatch.c index efb17c734..b3e5feacc 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -3123,6 +3123,10 @@ ProcFreeCursor(ClientPtr client) rc = dixLookupResourceByType((void **) &pCursor, stuff->id, X11_RESTYPE_CURSOR, client, DixDestroyAccess); if (rc == Success) { + if (pCursor == rootCursor) { + client->errorValue = stuff->id; + return BadCursor; + } FreeResource(stuff->id, X11_RESTYPE_NONE); return Success; }