Chromium Code Reviews| Index: ui/gl/gl_context_egl.cc |
| diff --git a/ui/gl/gl_context_egl.cc b/ui/gl/gl_context_egl.cc |
| index ed83b85ebd3cae5032592896753d9159a1435e55..6711eccb7fb99ec6e64224ca9cf17d7aeef4063a 100644 |
| --- a/ui/gl/gl_context_egl.cc |
| +++ b/ui/gl/gl_context_egl.cc |
| @@ -98,6 +98,12 @@ void GLContextEGL::Destroy() { |
| bool GLContextEGL::MakeCurrent(GLSurface* surface) { |
| DCHECK(context_); |
| + |
| + if (!surface) { |
| + ReleaseCurrent(nullptr); |
| + return true; |
| + } |
| + |
| if (IsCurrent(surface)) |
| return true; |