- Fixed: When the game nodes were the same as the render nodes, their pointers would not be NULLed.

SVN r2676 (trunk)
This commit is contained in:
Randy Heit 2010-09-03 02:11:35 +00:00
parent 81e21b0688
commit 092cbfd55b

View file

@ -3370,17 +3370,13 @@ void P_FreeLevelData ()
sectors = NULL;
numsectors = 0; // needed for the pointer cleanup code
}
if (gamenodes && gamenodes!=nodes)
if (gamenodes != NULL && gamenodes != nodes)
{
delete [] gamenodes;
gamenodes = NULL;
numgamenodes = 0;
delete[] gamenodes;
}
if (gamesubsectors && gamesubsectors!=subsectors)
if (gamesubsectors != NULL && gamesubsectors != subsectors)
{
delete [] gamesubsectors;
gamesubsectors = NULL;
numgamesubsectors = 0;
delete[] gamesubsectors;
}
if (subsectors != NULL)
{
@ -3392,13 +3388,15 @@ void P_FreeLevelData ()
}
}
delete[] subsectors;
subsectors = NULL;
}
if (nodes != NULL)
{
delete[] nodes;
nodes = NULL;
}
subsectors = gamesubsectors = NULL;
numsubsectors = numgamesubsectors = 0;
nodes = gamenodes = NULL;
numnodes = numgamenodes = 0;
if (lines != NULL)
{
delete[] lines;