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

@ -1463,7 +1463,10 @@ display_create(int *argc, char **argv[], const GOptionEntry *option_entries)
return NULL;
}
eglBindAPI(EGL_OPENGL_API);
if (!eglBindAPI(EGL_OPENGL_API)) {
fprintf(stderr, "failed to bind api EGL_OPENGL_API\n");
return NULL;
}
d->ctx = eglCreateContext(d->dpy, NULL, EGL_NO_CONTEXT, NULL);
if (d->ctx == NULL) {