From 08348691c3690b8de3a3e6836c47dfcbb5298303 Mon Sep 17 00:00:00 2001 From: "xuelian.bai" Date: Thu, 7 Jul 2016 19:02:28 +0800 Subject: [PATCH] Remove assert in eglReleaseThread,according to spec, Even if EGL is not initialized on any EGLDisplay, eglReleaseThread should succeed Change-Id: Ie15e8f57305d2a8f81cb6e3ddb623ca8bae08358 Signed-off-by: xuelian.bai --- src/modules/fastpath/coregl_fastpath_egl.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/modules/fastpath/coregl_fastpath_egl.c b/src/modules/fastpath/coregl_fastpath_egl.c index 3f7c328..611c5ac 100644 --- a/src/modules/fastpath/coregl_fastpath_egl.c +++ b/src/modules/fastpath/coregl_fastpath_egl.c @@ -1011,8 +1011,12 @@ fastpath_eglReleaseThread(void) _COREGL_FASTPATH_FUNC_BEGIN(); dpy = _orig_fastpath_eglGetCurrentDisplay(); - AST(dpy != EGL_NO_DISPLAY); - fastpath_eglMakeCurrent(dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); + + /* according to spec, + * Even if EGL is not initialized on any EGLDisplay, eglReleaseThread should succeed + */ + if (dpy != EGL_NO_DISPLAY) + fastpath_eglMakeCurrent(dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); ret = _orig_fastpath_eglReleaseThread(); goto finish; -- 2.7.4