mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 13:01:47 +00:00
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:
parent
b288a7a416
commit
1fda9421ac
1 changed files with 3 additions and 2 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue