mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-01-03 14:00:18 +01:00
egl: Fail properly if no configs are available instead of crashing
This commit is contained in:
parent
3908d80f57
commit
c3eb95bf66
1 changed files with 4 additions and 0 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue