gl-renderer: Accept non-NULL empty <visual_id> arrays

This change modifies egl_choose_config() to accept a non-NULL but empty
<visual_id> array (i.e. n_ids == 0)

Signed-off-by: Miguel A Vico Moya <mvicomoya@nvidia.com>
Reviewed-by: Andy Ritger <aritger@nvidia.com>
Reviewed-by: James Jones <jajones@nvidia.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
dev
Miguel A. Vico 9 years ago committed by Pekka Paalanen
parent 4057cd93d6
commit 684c9f49e5
  1. 2
      libweston/gl-renderer.c

@ -2586,7 +2586,7 @@ egl_choose_config(struct gl_renderer *gr, const EGLint *attribs,
goto out; goto out;
} }
if (!visual_id) if (!visual_id || n_ids == 0)
config_index = 0; config_index = 0;
for (i = 0; config_index == -1 && i < n_ids; i++) for (i = 0; config_index == -1 && i < n_ids; i++)

Loading…
Cancel
Save