Fix regression in networking memory cleanup in idLobby

This commit is contained in:
Stephen Saunders 2024-01-19 23:06:04 -05:00
parent ab663a769f
commit 9511a529af
2 changed files with 15 additions and 9 deletions

View file

@ -118,6 +118,20 @@ idLobby::idLobby()
connectIsFromInvite = false;
}
/*
========================
idLobby::~idLobby
========================
*/
idLobby::~idLobby()
{
// SRS - cleanup any allocations made for multiplayer networking support
Mem_Free( objMemory );
objMemory = NULL;
Mem_Free( lzwData );
lzwData = NULL;
}
/*
========================
idLobby::Initialize
@ -330,15 +344,6 @@ void idLobby::Shutdown( bool retainMigrationInfo, bool skipGoodbye )
}
}
// SRS - cleanup any allocations made for multiplayer networking support
if( objMemory )
{
Mem_Free( objMemory );
objMemory = NULL;
Mem_Free( lzwData );
lzwData = NULL;
}
state = STATE_IDLE;
}

View file

@ -41,6 +41,7 @@ class idLobby : public idLobbyBase
{
public:
idLobby();
~idLobby();
enum lobbyType_t
{