diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2014-12-04 08:05:33 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2014-12-04 08:28:42 +0100 |
commit | f5425301052357499a41d798c43c9f2c3306db4d (patch) | |
tree | a1ac165ab0a9ddaa00b5d698cd44aaa350fdf925 | |
parent | 64e45440ad11c1aabeaf853607bcb7e5f4fbafe4 (diff) |
add assert to detect double delete
Conflicts:
vcl/source/opengl/OpenGLContext.cxx
Change-Id: I13427cb698d29adb1d19b135ada91bcdfc8b8c92
-rw-r--r-- | vcl/source/opengl/OpenGLContext.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx index c9c3ecbf854c..0ebca34859e5 100644 --- a/vcl/source/opengl/OpenGLContext.cxx +++ b/vcl/source/opengl/OpenGLContext.cxx @@ -96,7 +96,9 @@ OpenGLContext::~OpenGLContext() #if defined( WNT ) if (m_aGLWin.hRC) { - g_vShareList.erase(std::remove(g_vShareList.begin(), g_vShareList.end(), m_aGLWin.hRC), g_vShareList.end()); + std::vector<HGLRC>::const_iterator itr = std::remove(g_vShareList.begin(), g_vShareList.end(), m_aGLWin.hRC); + assert(itr != g_vShareList.end()); + g_vShareList.erase(itr); wglMakeCurrent( m_aGLWin.hDC, 0 ); wglDeleteContext( m_aGLWin.hRC ); |