egl: fix type mismatch error type in _eglInitSurface
[mesa.git] / src / egl / main / eglsurface.c
index 231a5f01435bb66a97ae93fd31c70e62df958d3d..eb0bdfeca284221f20c684f865300525a1a4a64e 100644 (file)
@@ -284,7 +284,7 @@ _eglInitSurface(_EGLSurface *surf, _EGLDisplay *dpy, EGLint type,
 
    if ((conf->SurfaceType & type) == 0) {
       /* The config can't be used to create a surface of this type */
-      _eglError(EGL_BAD_CONFIG, func);
+      _eglError(EGL_BAD_MATCH, func);
       return EGL_FALSE;
    }