[Mesa-dev] [PATCH 2/2] egl/dri2: don't require a context for ClientWaitSync

Marek Olšák maraeo at gmail.com
Fri Sep 25 16:49:46 PDT 2015


From: Marek Olšák <marek.olsak at amd.com>

The spec doesn't require it. This fixes a crash on Android.

Cc: 10.6 11.0 <mesa-stable at lists.freedesktop.org>
---
 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 1740ee3..7d8977e 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -2430,7 +2430,7 @@ dri2_client_wait_sync(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync,
    /* the sync object should take a reference while waiting */
    dri2_egl_ref_sync(dri2_sync);
 
-   if (dri2_dpy->fence->client_wait_sync(dri2_ctx->dri_context,
+   if (dri2_dpy->fence->client_wait_sync(dri2_ctx ? dri2_ctx->dri_context : NULL,
                                          dri2_sync->fence, wait_flags,
                                          timeout))
       dri2_sync->base.SyncStatus = EGL_SIGNALED_KHR;
-- 
2.1.4



More information about the mesa-dev mailing list