| Index: ui/gl/gl_context_glx.cc
|
| diff --git a/ui/gl/gl_context_glx.cc b/ui/gl/gl_context_glx.cc
|
| index 30b07c7ca7d78bf00b9a78acc72801a621b70edb..9cbc1a9cbffbcc3e98aa6f79b15bb08d77e2a838 100644
|
| --- a/ui/gl/gl_context_glx.cc
|
| +++ b/ui/gl/gl_context_glx.cc
|
| @@ -113,19 +113,19 @@ bool GLContextGLX::MakeCurrent(GLSurface* surface) {
|
| SetRealGLApi();
|
|
|
| SetCurrent(surface);
|
| + ScopedReleaseCurrent release_current(this, surface);
|
| if (!InitializeDynamicBindings()) {
|
| - ReleaseCurrent(surface);
|
| Destroy();
|
| return false;
|
| }
|
|
|
| if (!surface->OnMakeCurrent(this)) {
|
| LOG(ERROR) << "Could not make current.";
|
| - ReleaseCurrent(surface);
|
| Destroy();
|
| return false;
|
| }
|
|
|
| + release_current.Release();
|
| return true;
|
| }
|
|
|
|
|