summaryrefslogtreecommitdiff
path: root/xserver/dix/dixutils.c
diff options
context:
space:
mode:
Diffstat (limited to 'xserver/dix/dixutils.c')
-rw-r--r--xserver/dix/dixutils.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/xserver/dix/dixutils.c b/xserver/dix/dixutils.c
index 1e3134663..cfb03974d 100644
--- a/xserver/dix/dixutils.c
+++ b/xserver/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)