summaryrefslogtreecommitdiff
path: root/vcl/source/opengl/OpenGLContext.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/opengl/OpenGLContext.cxx')
-rw-r--r--vcl/source/opengl/OpenGLContext.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx
index b0bc91d8d435..3a7a1fb3f169 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -97,7 +97,9 @@ OpenGLContext::~OpenGLContext()
#if defined( WNT )
if (m_aGLWin.hRC)
{
- vShareList.erase(std::remove(vShareList.begin(), vShareList.end(), m_aGLWin.hRC));
+ std::vector<HGLRC>::const_iterator itr = std::remove(vShareList.begin(), vShareList.end(), m_aGLWin.hRC);
+ assert(itr != vShareList.end());
+ vShareList.erase(itr);
wglMakeCurrent( m_aGLWin.hDC, 0 );
wglDeleteContext( m_aGLWin.hRC );