From 02dafb5068be31cc45af897a8bd1cae8f4724401 Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Tue, 21 Sep 2010 15:43:59 -0700 Subject: [PATCH] fix small bug in EGL error management make sure to clear our EGL implementation's error when returning an error from an underlying implementation Change-Id: Ibce4726cef1f900e4c7f16002345d7a07f8cdf41 --- opengl/libs/EGL/egl.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/opengl/libs/EGL/egl.cpp b/opengl/libs/EGL/egl.cpp index df21358dc..105ebb4d4 100644 --- a/opengl/libs/EGL/egl.cpp +++ b/opengl/libs/EGL/egl.cpp @@ -1344,16 +1344,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; }