From: Emil Velikov Date: Fri, 14 Oct 2016 20:42:00 +0000 (+0100) Subject: egl/surfaceless: use correct index when accesing the visual X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d19b014b774450741f02935fe84208f4889d3800;p=mesa.git egl/surfaceless: use correct index when accesing the visual i is used for the driver_configs, while j is for the visuals. Fixes: 4b8a55809eb ("egl/surfaceless: tweak surfaceless_add_configs_for_visuals()") Reported-by: Chad Versace Tested-by: Chad Versace Signed-off-by: Emil Velikov Reviewed-by: Eric Engestrom --- diff --git a/src/egl/drivers/dri2/platform_surfaceless.c b/src/egl/drivers/dri2/platform_surfaceless.c index 3fc1a684b4f..f891d91796d 100644 --- a/src/egl/drivers/dri2/platform_surfaceless.c +++ b/src/egl/drivers/dri2/platform_surfaceless.c @@ -198,7 +198,7 @@ surfaceless_add_configs_for_visuals(_EGLDriver *drv, _EGLDisplay *dpy) struct dri2_egl_config *dri2_conf; dri2_conf = dri2_add_config(dpy, dri2_dpy->driver_configs[i], - count + 1, EGL_PBUFFER_BIT, NULL, visuals[i].rgba_masks); + count + 1, EGL_PBUFFER_BIT, NULL, visuals[j].rgba_masks); if (dri2_conf) { count++;