diff options
Diffstat (limited to 'src/egl/drivers/dri2/platform_drm.c')
-rw-r--r-- | src/egl/drivers/dri2/platform_drm.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/egl/drivers/dri2/platform_drm.c b/src/egl/drivers/dri2/platform_drm.c index dc4efea9103..35bc4b5b1ac 100644 --- a/src/egl/drivers/dri2/platform_drm.c +++ b/src/egl/drivers/dri2/platform_drm.c @@ -155,6 +155,11 @@ dri2_drm_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp, config = dri2_get_dri_config(dri2_conf, EGL_WINDOW_BIT, dri2_surf->base.GLColorspace); + if (!config) { + _eglError(EGL_BAD_MATCH, "Unsupported surfacetype/colorspace configuration"); + goto cleanup_surf; + } + if (!dri2_drm_config_is_compatible(dri2_dpy, config, surface)) { _eglError(EGL_BAD_MATCH, "EGL config not compatible with GBM format"); goto cleanup_surf; |