// get an appropriate config
EGLConfig configs[1];
EGLint count;
- if (eglChooseConfig(display, config_attribs, configs, 1, &count) == EGL_FALSE || count == 0)
+ if (eglChooseConfig(display, config_attribs, configs, 1, &count) == EGL_FALSE){
exitEglError("Failed to choose config");
+ }
+ if (count == 0) {
+ fprintf(stderr, "Found no matching EGL configuration\n");
+ exit(1);
+ }
config = configs[0];
}
// return visual ID