summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2015-09-02 11:37:17 +0200
committerJan Holesovsky <kendy@collabora.com>2015-09-02 11:37:17 +0200
commit3c046ac76fd87e2ed49561b3e6240f3778644279 (patch)
treefc0cecffac7ca745f189eb7360a73625ccb23105
parente3ef73a8021a8a904bef493a71953ee8c60a8833 (diff)
windows opengl: Avoid an unnecessary wglMakeCurrent() call.
Change-Id: I1c1287a29067c053565c49c0ce96918a2d27d87f
-rw-r--r--vcl/source/opengl/OpenGLContext.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx
index f6cd458b221b..f3eeb7cfc53f 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -1190,7 +1190,6 @@ void OpenGLContext::reset()
// destroy all programs
if( !maPrograms.empty() )
{
-
makeCurrent();
maPrograms.clear();
}
@@ -1208,7 +1207,8 @@ void OpenGLContext::reset()
if (itr != g_vShareList.end())
g_vShareList.erase(itr);
- wglMakeCurrent(NULL, NULL);
+ if (wglGetCurrentContext() != NULL)
+ wglMakeCurrent(NULL, NULL);
wglDeleteContext( m_aGLWin.hRC );
ReleaseDC( m_aGLWin.hWnd, m_aGLWin.hDC );
}