diff options
Diffstat (limited to 'progs/openvg/trivial')
-rw-r--r-- | progs/openvg/trivial/eglcommon.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/progs/openvg/trivial/eglcommon.c b/progs/openvg/trivial/eglcommon.c index dcec1ac4a4..0316e596c6 100644 --- a/progs/openvg/trivial/eglcommon.c +++ b/progs/openvg/trivial/eglcommon.c @@ -61,13 +61,13 @@ make_x_window(Display *x_dpy, EGLDisplay egl_dpy, scrnum = DefaultScreen( x_dpy ); root = RootWindow( x_dpy, scrnum ); - if (!eglChooseConfig( egl_dpy, attribs, &config, 1, &num_configs)) { + if (!eglChooseConfig( egl_dpy, attribs, &config, 1, &num_configs) || + !num_configs) { printf("Error: couldn't get an EGL visual config\n"); exit(1); } assert(config); - assert(num_configs > 0); if (!eglGetConfigAttrib(egl_dpy, config, EGL_NATIVE_VISUAL_ID, &vid)) { printf("Error: eglGetConfigAttrib() failed\n"); |