Remove assert in eglReleaseThread,according to spec,
[platform/core/uifw/coregl.git] / src / modules / fastpath / coregl_fastpath_egl.c
index 3f7c328..611c5ac 100644 (file)
@@ -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;