From 63108c34ec181e923b68ee840bb7960f205466a7 Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Fri, 6 Sep 2013 13:36:49 -0700 Subject: [PATCH] fix a possible null dereference when eglMakeCurrent() fails Bug: 10648797 Change-Id: Iee0be47f2646feb25de4ea199bbb9b707452916e --- opengl/libs/EGL/eglApi.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/opengl/libs/EGL/eglApi.cpp b/opengl/libs/EGL/eglApi.cpp index 9d792fbe7..d3bc14a4d 100644 --- a/opengl/libs/EGL/eglApi.cpp +++ b/opengl/libs/EGL/eglApi.cpp @@ -745,7 +745,8 @@ EGLBoolean eglMakeCurrent( EGLDisplay dpy, EGLSurface draw, } } else { // this will ALOGE the error - result = setError(c->cnx->egl.eglGetError(), EGL_FALSE); + egl_connection_t* const cnx = &gEGLImpl; + result = setError(cnx->egl.eglGetError(), EGL_FALSE); } return result; }