summaryrefslogtreecommitdiff
path: root/dix/dixutils.c
diff options
context:
space:
mode:
Diffstat (limited to 'dix/dixutils.c')
-rw-r--r--dix/dixutils.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/dix/dixutils.c b/dix/dixutils.c
index 1bdeee064..5cede5f43 100644
--- a/dix/dixutils.c
+++ b/dix/dixutils.c
@@ -240,14 +240,9 @@ dixLookupWindow(WindowPtr *pWin, XID id, ClientPtr client, Mask access)
int
dixLookupGC(GCPtr *pGC, XID id, ClientPtr client, Mask access)
{
- GCPtr pTmp = (GCPtr)SecurityLookupIDByType(client, id, RT_GC, access);
- if (pTmp) {
- *pGC = pTmp;
- return Success;
- }
- client->errorValue = id;
- *pGC = NULL;
- return BadGC;
+ int rc;
+ rc = dixLookupResourceByType((pointer *)pGC, id, RT_GC, client, access);
+ return (rc == BadValue) ? BadGC : rc;
}
int