Backported from GZDoom:

- Fixed: P_LoopSidedefs() needs to clean out sidetemp[] because when it's called a second time, the maximum of the number of vertices and that of sides may have increased compared to when P_AllocateSideDefs() created the array, which led to access violations.

SVN r2541 (trunk)
This commit is contained in:
Christoph Oelckers 2010-08-14 20:00:47 +00:00
parent b288a7a416
commit 1fda9421ac

View file

@ -2132,10 +2132,11 @@ static void P_LoopSidedefs ()
{
int i;
if (sidetemp == NULL)
if (sidetemp != NULL)
{
sidetemp = new sidei_t[MAX(numvertexes, numsides)];
delete[] sidetemp;
}
sidetemp = new sidei_t[MAX(numvertexes, numsides)];
for (i = 0; i < numvertexes; ++i)
{