mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
- 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:
@@ -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( );
|
||||||
|
|
||||||
|
|||||||
@@ -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 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user