diff options
-rw-r--r-- | opengl/libagl/egl.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/opengl/libagl/egl.cpp b/opengl/libagl/egl.cpp index c1efd1cae6..9c3071472d 100644 --- a/opengl/libagl/egl.cpp +++ b/opengl/libagl/egl.cpp @@ -1459,6 +1459,9 @@ EGLBoolean eglGetConfigs( EGLDisplay dpy, if (egl_display_t::is_valid(dpy) == EGL_FALSE) return setError(EGL_BAD_DISPLAY, EGL_FALSE); + if (ggl_unlikely(num_config==NULL)) + return setError(EGL_BAD_PARAMETER, EGL_FALSE); + GLint numConfigs = NELEM(gConfigs); if (!configs) { *num_config = numConfigs; @@ -1478,8 +1481,8 @@ EGLBoolean eglChooseConfig( EGLDisplay dpy, const EGLint *attrib_list, { if (egl_display_t::is_valid(dpy) == EGL_FALSE) return setError(EGL_BAD_DISPLAY, EGL_FALSE); - - if (ggl_unlikely(num_config==0)) { + + if (ggl_unlikely(num_config==NULL)) { return setError(EGL_BAD_PARAMETER, EGL_FALSE); } |