Chromium Code Reviews| Index: ui/gl/gl_surface_ozone.cc |
| diff --git a/ui/gl/gl_surface_ozone.cc b/ui/gl/gl_surface_ozone.cc |
| index da80397654374248b9305f0701a7c0ba0de7eaa5..3fe9b03f52dbacf0fc13f657c6a125e222e4021c 100644 |
| --- a/ui/gl/gl_surface_ozone.cc |
| +++ b/ui/gl/gl_surface_ozone.cc |
| @@ -603,9 +603,11 @@ void GLSurfaceOzoneSurfacelessSurfaceImpl::Destroy() { |
| } |
| if (!was_current) { |
| - previous_context->MakeCurrent(previous_surface.get()); |
| - } else { |
| - context_->ReleaseCurrent(this); |
| + if (previous_context) { |
|
spang
2016/04/13 14:00:49
Seems like it should be
if (!was_current && previ
spang
2016/04/13 14:16:20
I guess it's fine the way it is, if you fall throu
|
| + previous_context->MakeCurrent(previous_surface.get()); |
| + } else { |
| + context_->ReleaseCurrent(this); |
| + } |
| } |
| } |