filesystem: when shutting down, clean up gameinfo pointers and total games count

This commit is contained in:
Alibek Omarov 2025-02-05 21:14:08 +03:00
parent 5e524bca60
commit 1d99f65e86

View file

@ -1729,12 +1729,17 @@ FS_Shutdown
void FS_ShutdownStdio( void )
{
int i;
// release gamedirs
for( i = 0; i < FI.numgames; i++ )
{
if( FI.games[i] )
{
Mem_Free( FI.games[i] );
FI.games[i] = NULL;
}
}
FI.numgames = 0;
FS_ClearSearchPath(); // release all wad files too
Mem_FreePool( &fs_mempool );