diff --git a/dix/dispatch.c b/dix/dispatch.c index 87bab1791..c619ff8fa 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -3107,6 +3107,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; }