diff --git a/shell/platform/android/android_context_gl.cc b/shell/platform/android/android_context_gl.cc index 08744ace7bc3705ea58e5669de25120a4cc88eae..b61f4ec7433c8614673a8fb40a296a30738f782d 100644 --- a/shell/platform/android/android_context_gl.cc +++ b/shell/platform/android/android_context_gl.cc @@ -222,6 +222,9 @@ bool AndroidContextGL::MakeCurrent() { } bool AndroidContextGL::ClearCurrent() { + if (eglGetCurrentContext() != context_) { + return true; + } if (eglMakeCurrent(environment_->Display(), EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT) != EGL_TRUE) { FML_LOG(ERROR) << "Could not clear the current context";