Fix Doom Classic crashes on exit and/or quit

This commit is contained in:
Stephen Saunders 2023-06-15 15:13:52 -04:00
parent 39ae1202b4
commit 5ff88fdfd0
2 changed files with 4 additions and 2 deletions

View file

@ -127,6 +127,8 @@ void idRenderLog::Init()
void idRenderLog::Shutdown()
{
commandList = nullptr;
for( int i = 0; i < MRB_TOTAL * NUM_FRAME_DATA; i++ )
{
timerQueries[i].Reset();

View file

@ -2199,8 +2199,8 @@ void idRenderSystemLocal::Shutdown()
UnbindBufferObjects();
// SRS - wait for fence to hit before freeing any resources the GPU may be using, otherwise get Vulkan validation layer errors on shutdown
// SRS - skip this step if we are in Doom 3 mode (com_smp = -1) which has already finished and presented
if( com_smp.GetInteger() != -1 )
// SRS - skip this step if we are in a Doom Classic game
if( common->GetCurrentGame() == DOOM3_BFG )
{
backend.GL_BlockingSwapBuffers();
}