diff options
Diffstat (limited to 'composite/compinit.c')
-rw-r--r-- | composite/compinit.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/composite/compinit.c b/composite/compinit.c index 5b2fba1a4..a844017c1 100644 --- a/composite/compinit.c +++ b/composite/compinit.c @@ -296,10 +296,12 @@ compAddAlternateVisual(ScreenPtr pScreen, CompScreenPtr cs, * for all colormaps. */ for (i = 0; i < numInstalledCmaps; i++) { - int j; + int j, rc; - installedCmap = LookupIDByType (installedCmaps[i], RT_COLORMAP); - if (!installedCmap) + rc = dixLookupResourceByType((pointer *)&installedCmap, + installedCmaps[i], RT_COLORMAP, + serverClient, DixReadAccess); + if (rc != Success) continue; j = installedCmap->pVisual - pScreen->visuals; installedCmap->pVisual = &visuals[j]; |