egl/surfaceless: use correct index when accesing the visual
authorEmil Velikov <emil.velikov@collabora.com>
Fri, 14 Oct 2016 20:42:00 +0000 (21:42 +0100)
committerChad Versace <chadversary@chromium.org>
Sun, 16 Oct 2016 16:03:27 +0000 (09:03 -0700)
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 <chadversary@chromium.org>
Tested-by: Chad Versace <chadversary@chromium.org>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
src/egl/drivers/dri2/platform_surfaceless.c

index 3fc1a684b4f109389966dfc1d0b4dac09715a3ca..f891d91796d5f46b4434395c984cf8392eceab65 100644 (file)
@@ -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++;