fix: KeyValues memory leak in birds

This commit is contained in:
CosminPerRam
2025-05-28 02:02:25 +03:00
committed by EricS-Valve
parent d0120a68d3
commit 64ab46fbf0
+3
View File
@@ -90,7 +90,10 @@ void CEntityBird::SpawnRandomBirds( void )
KeyValues *pFileKV = new KeyValues( "birds" );
if ( !pFileKV->LoadFromFile( g_pFullFileSystem, "scripts/birds.txt", "MOD" ) )
{
pFileKV->deleteThis();
return;
}
// Build a list of birds in the map already, and make sure we don't spawn any on those spots again
CUtlVector<Vector> vecExistingBirds;