dri2: declare variables where needed in DRI2SwapLimit()

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult
2026-02-05 17:32:10 +01:00
committed by Enrico Weigelt
parent 50839192dc
commit f79a8f5f78

View File

@@ -283,12 +283,11 @@ Bool
DRI2SwapLimit(DrawablePtr pDraw, int swap_limit)
{
DRI2DrawablePtr pPriv = DRI2GetDrawable(pDraw);
DRI2ScreenPtr ds;
if (!pPriv)
return FALSE;
ds = pPriv->dri2_screen;
DRI2ScreenPtr ds = pPriv->dri2_screen;
if (!ds->SwapLimitValidate || !ds->SwapLimitValidate(pDraw, swap_limit))
return FALSE;