From 71224789cf408c97b39eb9581e149d1b9d178700 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Tue, 20 Sep 2022 17:50:42 -0400 Subject: [PATCH] egl/dri2: Fix a weird conditional in dri2_make_current MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit It's not valid to get here with no context but with real surfaces. Reviewed-by: Marek Olšák Part-of: --- src/egl/drivers/dri2/egl_dri2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c index 356548e..c62e130 100644 --- a/src/egl/drivers/dri2/egl_dri2.c +++ b/src/egl/drivers/dri2/egl_dri2.c @@ -1825,7 +1825,7 @@ dri2_make_current(_EGLDisplay *disp, _EGLSurface *dsurf, rdraw = (rsurf) ? dri2_dpy->vtbl->get_dri_drawable(rsurf) : NULL; cctx = (dri2_ctx) ? dri2_ctx->dri_context : NULL; - if (cctx || ddraw || rdraw) { + if (cctx) { if (!dri2_dpy->core->bindContext(cctx, ddraw, rdraw)) { _EGLContext *tmp_ctx; -- 2.7.4