summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/backends/meta-egl.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/backends/meta-egl.c b/src/backends/meta-egl.c
index d9c7b24d1..775863f88 100644
--- a/src/backends/meta-egl.c
+++ b/src/backends/meta-egl.c
@@ -299,6 +299,14 @@ meta_egl_choose_first_config (MetaEgl *egl,
return FALSE;
}
+ if (num_matches == 0)
+ {
+ g_free (configs);
+ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
+ "No matching EGLConfig found");
+ return FALSE;
+ }
+
/*
* We don't have any preference specified yet, so lets choose the first one.
*/