egl/surfaceless: use correct index when accesing the visual

i is used for the driver_configs, while j is for the visuals.

Fixes: 4b8a55809e ("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>
This commit is contained in:
Emil Velikov 2016-10-14 21:42:00 +01:00 committed by Chad Versace
parent 36cb5508e8
commit d19b014b77

View 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++;