diff --git a/opengl/libs/EGL/egl.cpp b/opengl/libs/EGL/egl.cpp index 2f4d5db40..a8200be30 100644 --- a/opengl/libs/EGL/egl.cpp +++ b/opengl/libs/EGL/egl.cpp @@ -1365,16 +1365,18 @@ EGLBoolean eglWaitNative(EGLint engine) EGLint eglGetError(void) { EGLint result = EGL_SUCCESS; + EGLint err; for (int i=0 ; idso) err = cnx->egl.eglGetError(); if (err!=EGL_SUCCESS && result==EGL_SUCCESS) result = err; } + err = getError(); if (result == EGL_SUCCESS) - result = getError(); + result = err; return result; }