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