summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJonas Ådahl <jadahl@gmail.com>2018-02-23 23:51:58 +0800
committerJonas Ådahl <jadahl@gmail.com>2018-03-05 15:42:27 +0000
commit7a41483ea066d9654c2eb3104cda27439ad4ca05 (patch)
treef06c7199a887a1a1fc2ecc7805a9ed795c915f2b /src
parentb4d642be525bdcee4d256d4596eecda4dd1722b0 (diff)
downloadmutter-7a41483ea066d9654c2eb3104cda27439ad4ca05.tar.gz
egl: Fail first config choosing when no results
If there was no matching config, fail to find the first one. https://gitlab.gnome.org/GNOME/mutter/issues/2
Diffstat (limited to 'src')
-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.
*/