diff options
author | Kristian Høgsberg <krh@redhat.com> | 2009-04-07 16:28:08 -0400 |
---|---|---|
committer | Kristian Høgsberg <krh@redhat.com> | 2009-04-07 16:28:26 -0400 |
commit | df27b870a8db7a5153b18a556fe77efa590f9eee (patch) | |
tree | 314be5003e0a1a1de105e67dbd9580d79efe746a /glx/xfont.c | |
parent | 92562747a0fdbef1dbedf734cb55dd6a9e1d2994 (diff) |
Convert remaining GLX LookupIDByType() calls
Diffstat (limited to 'glx/xfont.c')
-rw-r--r-- | glx/xfont.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/glx/xfont.c b/glx/xfont.c index 1f4ecbd4d..b8b466d87 100644 --- a/glx/xfont.c +++ b/glx/xfont.c @@ -180,12 +180,17 @@ int __glXDisp_UseXFont(__GLXclientState *cl, GLbyte *pc) ** Font can actually be either the ID of a font or the ID of a GC ** containing a font. */ - pFont = (FontPtr)LookupIDByType(req->font, RT_FONT); - if (!pFont) { - pGC = (GC *)LookupIDByType(req->font, RT_GC); - if (!pGC) { + + error = dixLookupResourceByType((pointer *)&pFont, + req->font, RT_FONT, + client, DixReadAccess); + if (error != Success) { + error = dixLookupResourceByType((pointer *)&pGC, + req->font, RT_GC, + client, DixReadAccess); + if (error != Success) { client->errorValue = req->font; - return BadFont; + return error == BadGC ? BadFont : error; } pFont = pGC->font; } |