- memory leaking killer pack

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@647 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Lesh
2006-12-10 12:25:17 +00:00
parent 7bcba64bf2
commit f8b3f82cfc
2 changed files with 22 additions and 1 deletions
+16
View File
@@ -3029,6 +3029,22 @@ UINT32 MapScreenInit(void)
UINT32 MapScreenShutdown(void) UINT32 MapScreenShutdown(void)
{ {
// destroy some popup boxes
fShowAssignmentMenu = FALSE;
CreateDestroyAssignmentPopUpBoxes( );
fShowContractMenu = FALSE;
DetermineIfContractMenuCanBeShown( );
RemoveBox(ghContractBox);
ghContractBox = -1;
if ( ghRemoveMercAssignBox != -1 )
{
fShowRemoveMenu = FALSE;
RemoveBox( ghRemoveMercAssignBox );
ghRemoveMercAssignBox = -1;
}
// free up alloced mapscreen messages // free up alloced mapscreen messages
FreeGlobalMessageList( ); FreeGlobalMessageList( );
+5
View File
@@ -1366,7 +1366,10 @@ BOOLEAN LoadAndAddWorldItemsFromTempFile( INT16 sMapX, INT16 sMapY, INT8 bMapZ )
//Load the World Items from the file //Load the World Items from the file
if( !LoadWorldItemsFromTempItemFile( sMapX, sMapY, bMapZ, pWorldItems ) ) if( !LoadWorldItemsFromTempItemFile( sMapX, sMapY, bMapZ, pWorldItems ) )
{
MemFree( pWorldItems );
return( FALSE ); return( FALSE );
}
//If we have already been to the sector //If we have already been to the sector
@@ -1416,6 +1419,8 @@ BOOLEAN LoadAndAddWorldItemsFromTempFile( INT16 sMapX, INT16 sMapY, INT8 bMapZ )
} }
} }
MemFree( pWorldItems );
return( TRUE ); return( TRUE );
} }