Some additional return value checking

This commit is contained in:
Darxus 2010-11-22 21:24:39 -05:00 committed by Kristian Høgsberg
parent e9f5e36730
commit 55973f2f5a
3 changed files with 23 additions and 8 deletions

View file

@ -339,7 +339,11 @@ init_egl(struct drm_compositor *ec, struct udev_device *device)
return -1;
}
eglBindAPI(EGL_OPENGL_ES_API);
if (!eglBindAPI(EGL_OPENGL_ES_API)) {
fprintf(stderr, "failed to bind api EGL_OPENGL_ES_API\n");
return -1;
}
ec->base.context = eglCreateContext(ec->base.display, NULL,
EGL_NO_CONTEXT, context_attribs);
if (ec->base.context == NULL) {