mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +00:00
Fix two Polymer crashes related to corrupted maps.
git-svn-id: https://svn.eduke32.com/eduke32@4471 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
5f3921fa93
commit
20bf310cba
1 changed files with 2 additions and 2 deletions
|
@ -2884,7 +2884,7 @@ static void polymer_updatewall(int16_t wallnum)
|
|||
w = prwalls[wallnum];
|
||||
s = prsectors[sectofwall];
|
||||
invalid = s->invalidid;
|
||||
if (nwallnum >= 0 && nwallnum < numwalls)
|
||||
if (nwallnum >= 0 && nwallnum < numwalls && wal->nextsector >= 0 && wal->nextsector < numsectors)
|
||||
{
|
||||
ns = prsectors[wal->nextsector];
|
||||
invalid += ns->invalidid;
|
||||
|
@ -2969,7 +2969,7 @@ static void polymer_updatewall(int16_t wallnum)
|
|||
else
|
||||
xref = 0;
|
||||
|
||||
if (wal->nextsector < 0 || wal->nextsector >= numsectors)
|
||||
if (wal->nextsector < 0 || wal->nextsector >= numsectors || !ns)
|
||||
{
|
||||
Bmemcpy(w->wall.buffer, &s->floor.buffer[(wallnum - sec->wallptr) * 5], sizeof(GLfloat) * 3);
|
||||
Bmemcpy(&w->wall.buffer[5], &s->floor.buffer[(wal->point2 - sec->wallptr) * 5], sizeof(GLfloat) * 3);
|
||||
|
|
Loading…
Reference in a new issue