From 509b1b7141060ff1bbb68573e99db9f57977d4ba Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Tue, 23 Feb 2021 19:09:41 -0500 Subject: [PATCH] Fix for Coverity issue 157131. Don't allow exception to be thrown from OPENGL_COMPOSITOR dtor. --- common/gal/opengl/opengl_compositor.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/common/gal/opengl/opengl_compositor.cpp b/common/gal/opengl/opengl_compositor.cpp index e87c219276..0edbd9431c 100644 --- a/common/gal/opengl/opengl_compositor.cpp +++ b/common/gal/opengl/opengl_compositor.cpp @@ -56,7 +56,17 @@ OPENGL_COMPOSITOR::OPENGL_COMPOSITOR() : OPENGL_COMPOSITOR::~OPENGL_COMPOSITOR() { if( m_initialized ) - clean(); + { + try + { + clean(); + } + catch( const std::runtime_error& exc ) + { + wxLogError( wxT( "Run time exception `%s` occurred in OPENGL_COMPOSITOR destructor." ), + exc.what() ); + } + } }