From 59ef73d71f53a744d5b37b063fc709b5b33a9b17 Mon Sep 17 00:00:00 2001 From: Mixie <97407744+Maxi741cv@users.noreply.github.com> Date: Sat, 14 Mar 2026 21:32:06 +0300 Subject: [PATCH] xlib: fix skipping visuals in destroy_visuals_on_display This commit decrements the loop index after deletion to ensure all visuals for the display are properly destroyed. Related: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14947 Reviewed-by: Adam Jackson Part-of: --- src/gallium/frontends/glx/xlib/glx_api.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/frontends/glx/xlib/glx_api.c b/src/gallium/frontends/glx/xlib/glx_api.c index 3b74a313cc6..c23887c1da3 100644 --- a/src/gallium/frontends/glx/xlib/glx_api.c +++ b/src/gallium/frontends/glx/xlib/glx_api.c @@ -606,6 +606,7 @@ destroy_visuals_on_display(Display *dpy) for (j = i; j < NumVisuals - 1; j++) VisualTable[j] = VisualTable[j + 1]; NumVisuals--; + i--; } } }