Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 75b79d3f authored by Jesse Hall's avatar Jesse Hall Committed by Gerrit Code Review
Browse files

Merge "egl: Call loseCurrent after eglReleaseThread"

parents 52711563 3ac517a8
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -1339,13 +1339,14 @@ EGLBoolean eglReleaseThread(void)
        GLTrace_eglReleaseThread();
#endif

    // If there is context bound to the thread, release it
    egl_display_t::loseCurrent(get_context(getContext()));

    egl_connection_t* const cnx = &gEGLImpl;
    if (cnx->dso && cnx->egl.eglReleaseThread) {
        cnx->egl.eglReleaseThread();
    }

    // If there is context bound to the thread, release it
    egl_display_t::loseCurrent(get_context(getContext()));

    egl_tls_t::clearTLS();
    return EGL_TRUE;
}