diff --git a/render/render.c b/render/render.c index 8d5eaf35dd..146523924d 100644 --- a/render/render.c +++ b/render/render.c @@ -308,7 +308,6 @@ ProcRenderQueryPictFormats(ClientPtr client) VisualPtr pVisual; DepthPtr pDepth; int v, d; - PictFormatPtr pFormat; int nformat; int ndepth; int nvisual; @@ -376,6 +375,7 @@ ProcRenderQueryPictFormats(ClientPtr client) PictureScreenPtr ps = GetPictureScreenIfSet(walkScreen); if (ps) { size_t idx; + PictFormatPtr pFormat; for (idx = 0, pFormat = ps->formats; idx < ps->nformats; idx++, pFormat++) { pictForm->id = pFormat->id; @@ -421,6 +421,8 @@ ProcRenderQueryPictFormats(ClientPtr client) pDepth = walkScreen->allowedDepths + d; pictDepth->nPictVisuals = 0; /* counting in here */ for (v = 0; v < pDepth->numVids; v++) { + PictFormatPtr pFormat; + pVisual = findVisual(walkScreen, pDepth->vids[v]); if (pVisual && (pFormat = PictureMatchVisual(walkScreen, pDepth->depth,