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

Commit fe6102f0 authored by Mathias Agopian's avatar Mathias Agopian Committed by Android (Google) Code Review
Browse files

Merge "don't error out when eglTerminate()ing an already terminated display"

parents 4b3e4ae0 fe98127e
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -263,7 +263,13 @@ EGLBoolean egl_display_t::terminate() {
    Mutex::Autolock _l(lock);

    if (refs == 0) {
        return setError(EGL_NOT_INITIALIZED, EGL_FALSE);
        /*
         * From the EGL spec (3.2):
         * "Termination of a display that has already been terminated,
         *  (...), is allowed, but the only effect of such a call is
         *  to return EGL_TRUE (...)
         */
        return EGL_TRUE;
    }

    // this is specific to Android, display termination is ref-counted.