From a39927d4c4be5eb3073c95a59721e70f2f542331 Mon Sep 17 00:00:00 2001 From: Ali Juma Date: Thu, 15 Mar 2012 15:57:54 -0400 Subject: [PATCH] Bug 736099 - Prevent a null pointer dereference in GLController.disposeGLContext. r=kats --- mobile/android/base/gfx/GLController.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mobile/android/base/gfx/GLController.java b/mobile/android/base/gfx/GLController.java index cfa57bcd35cc..0bad187a42d8 100644 --- a/mobile/android/base/gfx/GLController.java +++ b/mobile/android/base/gfx/GLController.java @@ -94,6 +94,10 @@ public class GLController { } public void disposeGLContext() { + if (mEGL == null) { + return; + } + if (!mEGL.eglMakeCurrent(mEGLDisplay, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_CONTEXT)) { throw new GLControllerException("EGL context could not be released!");