[PATCH weston 5/5] gl-renderer: Accept non-NULL empty <visual_id> arrays

Miguel A. Vico mvicomoya at nvidia.com
Wed May 11 12:50:20 UTC 2016


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 at nvidia.com>
Reviewed-by: Andy Ritger <aritger at nvidia.com>
Reviewed-by: James Jones <jajones at nvidia.com>
---
 src/gl-renderer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gl-renderer.c b/src/gl-renderer.c
index 7f52205..1d76488 100644
--- a/src/gl-renderer.c
+++ b/src/gl-renderer.c
@@ -2493,7 +2493,7 @@ egl_choose_config(struct gl_renderer *gr, const EGLint *attribs,
 		goto out;
 	}
 
-	if (!visual_id)
+	if (!visual_id || n_ids == 0)
 		config_index = 0;
 
 	for (i = 0; config_index == -1 && i < n_ids; i++)
-- 
2.8.0



More information about the wayland-devel mailing list