summaryrefslogtreecommitdiffstats
path: root/gfx/gl/GLContextProviderWGL.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/gl/GLContextProviderWGL.cpp')
-rw-r--r--gfx/gl/GLContextProviderWGL.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/gfx/gl/GLContextProviderWGL.cpp b/gfx/gl/GLContextProviderWGL.cpp
index 35957259d..da8c93d10 100644
--- a/gfx/gl/GLContextProviderWGL.cpp
+++ b/gfx/gl/GLContextProviderWGL.cpp
@@ -314,20 +314,17 @@ GLContextWGL::Init()
if (!mDC || !mContext)
return false;
- // see bug 929506 comment 29. wglGetProcAddress requires a current context.
- if (!sWGLLib.fMakeCurrent(mDC, mContext))
- return false;
-
SetupLookupFunction();
- if (!InitWithPrefix("gl", true))
- return false;
-
- return true;
+ return InitWithPrefix("gl", true);
}
bool
GLContextWGL::MakeCurrentImpl(bool aForce)
{
+ if (IsDestroyed()) {
+ MOZ_ALWAYS_TRUE(sWGLLib.fMakeCurrent(0, 0));
+ }
+
BOOL succeeded = true;
// wglGetCurrentContext seems to just pull the HGLRC out