7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-21 20:23:44 +00:00

Fix lock condition in GL_CONTEXT_MANAGER, remove unnecessary assert.

Assert handler is already being called from wxCHECK.
This commit is contained in:
Alex Shvartzkop 2023-06-14 07:45:34 +03:00
parent fd669773b6
commit dfb05c4f4b

View File

@ -87,8 +87,7 @@ void GL_CONTEXT_MANAGER::DeleteAll()
void GL_CONTEXT_MANAGER::LockCtx( wxGLContext* aContext, wxGLCanvas* aCanvas )
{
assert( aContext );
wxCHECK( aContext && ( aCanvas || m_glContexts.count( aContext ) > 0 ), /* void */ );
wxCHECK( aContext && m_glContexts.count( aContext ) > 0, /* void */ );
m_glCtxMutex.lock();
wxGLCanvas* canvas = aCanvas ? aCanvas : m_glContexts.at( aContext );
@ -107,7 +106,6 @@ void GL_CONTEXT_MANAGER::LockCtx( wxGLContext* aContext, wxGLCanvas* aCanvas )
void GL_CONTEXT_MANAGER::UnlockCtx( wxGLContext* aContext )
{
assert( aContext );
wxCHECK( aContext && m_glContexts.count( aContext ) > 0, /* void */ );
if( m_glCtx == aContext )