diff options
-rw-r--r-- | opengl/libs/EGL/egl.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/opengl/libs/EGL/egl.cpp b/opengl/libs/EGL/egl.cpp index 8977fbf5e..3dc8c03fa 100644 --- a/opengl/libs/EGL/egl.cpp +++ b/opengl/libs/EGL/egl.cpp @@ -389,10 +389,9 @@ static tls_t* getTLS() } static inline void clearError() { - if (gEGLThreadLocalStorageKey != -1) { - tls_t* tls = getTLS(); - tls->error = EGL_SUCCESS; - } + // This must clear the error from all the underlying EGL implementations as + // well as the EGL wrapper layer. + eglGetError(); } template<typename T> |