From dfb05c4f4bbf5aa5ff37a825c5ae7bd96e8f018c Mon Sep 17 00:00:00 2001 From: Alex Shvartzkop Date: Wed, 14 Jun 2023 07:45:34 +0300 Subject: [PATCH] Fix lock condition in GL_CONTEXT_MANAGER, remove unnecessary assert. Assert handler is already being called from wxCHECK. --- common/gl_context_mgr.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/common/gl_context_mgr.cpp b/common/gl_context_mgr.cpp index 2947c90b07..dbbe0531e0 100644 --- a/common/gl_context_mgr.cpp +++ b/common/gl_context_mgr.cpp @@ -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 )