Index: ui/gl/gl_context_wgl.cc |
diff --git a/ui/gl/gl_context_wgl.cc b/ui/gl/gl_context_wgl.cc |
index 41f1b6349e027c24fedf7a190db21e0b2bda93db..220942339c837b56de3c89b833323a2c68448e2a 100644 |
--- a/ui/gl/gl_context_wgl.cc |
+++ b/ui/gl/gl_context_wgl.cc |
@@ -85,8 +85,9 @@ bool GLContextWGL::MakeCurrent(GLSurface* surface) { |
SetRealGLApi(); |
SetCurrent(surface); |
+ ScopedReleaseCurrent release_current(this, surface); |
+ |
if (!InitializeDynamicBindings()) { |
- ReleaseCurrent(surface); |
return false; |
} |
@@ -95,6 +96,7 @@ bool GLContextWGL::MakeCurrent(GLSurface* surface) { |
return false; |
} |
+ release_current.Release(); |
return true; |
} |