[cairo-commit] boilerplate/cairo-boilerplate-egl.c
Benjamin Otte
company at kemper.freedesktop.org
Fri Jun 18 10:26:31 PDT 2010
boilerplate/cairo-boilerplate-egl.c | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit c3eb95bf6670bbc06ef908481da95f3504c7dc4d
Author: Benjamin Otte <otte at redhat.com>
Date: Fri Jun 18 19:26:07 2010 +0200
egl: Fail properly if no configs are available instead of crashing
diff --git a/boilerplate/cairo-boilerplate-egl.c b/boilerplate/cairo-boilerplate-egl.c
index 413c7ed..71f9c75 100644
--- a/boilerplate/cairo-boilerplate-egl.c
+++ b/boilerplate/cairo-boilerplate-egl.c
@@ -87,6 +87,10 @@ _cairo_boilerplate_egl_create_surface (const char *name,
}
eglGetConfigs (gltc->dpy, NULL, 0, &numConfigs);
+ if (numConfigs == 0) {
+ free (gltc);
+ return NULL;
+ }
configs = xmalloc(sizeof(*configs) *numConfigs);
eglGetConfigs (gltc->dpy, configs, numConfigs, &numConfigs);
More information about the cairo-commit
mailing list