Attempt to fix Coverity issue 168705.
This commit is contained in:
parent
e7227a4f21
commit
b959378d58
|
@ -95,11 +95,18 @@ void CACHED_CONTAINER_GPU::Unmap()
|
||||||
|
|
||||||
// This gets called from ~CACHED_CONTAINER_GPU. To avoid throwing an exception from
|
// This gets called from ~CACHED_CONTAINER_GPU. To avoid throwing an exception from
|
||||||
// the dtor, catch it here instead.
|
// the dtor, catch it here instead.
|
||||||
glUnmapBuffer( GL_ARRAY_BUFFER );
|
try
|
||||||
checkGlError( "unmapping vertices buffer" );
|
{
|
||||||
glBindBuffer( GL_ARRAY_BUFFER, 0 );
|
glUnmapBuffer( GL_ARRAY_BUFFER );
|
||||||
m_vertices = NULL;
|
checkGlError( "unmapping vertices buffer" );
|
||||||
checkGlError( "unbinding vertices buffer" );
|
glBindBuffer( GL_ARRAY_BUFFER, 0 );
|
||||||
|
m_vertices = NULL;
|
||||||
|
checkGlError( "unbinding vertices buffer" );
|
||||||
|
}
|
||||||
|
catch( const std::runtime_error& err )
|
||||||
|
{
|
||||||
|
wxLogError( wxT( "OpenGL did not shut down properly.\n\n%s" ), err.what() );
|
||||||
|
}
|
||||||
|
|
||||||
m_isMapped = false;
|
m_isMapped = false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue