diff --git a/src/egl/drivers/dri2/egl_dri2.h b/src/egl/drivers/dri2/egl_dri2.h index cc76c73eab2..3574f5940b5 100644 --- a/src/egl/drivers/dri2/egl_dri2.h +++ b/src/egl/drivers/dri2/egl_dri2.h @@ -479,7 +479,7 @@ dri2_get_dri_config(struct dri2_egl_config *conf, EGLint surface_type, static inline void dri2_set_WL_bind_wayland_display(_EGLDriver *drv, _EGLDisplay *disp) { -#ifdef HAVE_WAYLAND_PLATFORM +#if 0 struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp); (void) drv; diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c index 5110688f2d1..0344902a751 100644 --- a/src/egl/main/eglapi.c +++ b/src/egl/main/eglapi.c @@ -2170,7 +2170,8 @@ eglBindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display) _EGL_FUNC_START(disp, EGL_OBJECT_DISPLAY_KHR, NULL, EGL_FALSE); _EGL_CHECK_DISPLAY(disp, EGL_FALSE, drv); - assert(disp->Extensions.WL_bind_wayland_display); + if (!disp->Extensions.WL_bind_wayland_display) + RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, EGL_FALSE); if (!display) RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, EGL_FALSE);