diff options
Diffstat (limited to 'dix/dixutils.c')
-rw-r--r-- | dix/dixutils.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/dix/dixutils.c b/dix/dixutils.c index 00bbde67c..2b5391f2d 100644 --- a/dix/dixutils.c +++ b/dix/dixutils.c @@ -202,13 +202,12 @@ dixLookupDrawable(DrawablePtr *pDraw, XID id, ClientPtr client, int rc; *pDraw = NULL; - client->errorValue = id; - - if (id == INVALID) - return BadDrawable; rc = dixLookupResourceByClass((pointer *)&pTmp, id, RC_DRAWABLE, client, access); + if (rc != Success) + client->errorValue = id; + if (rc == BadValue) return BadDrawable; if (rc != Success) |