mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 21:11:39 +00:00
Fixed crash on loading map with corrupt linedefs and/or sectors
See http://forum.zdoom.org/viewtopic.php?t=49276
This commit is contained in:
parent
f46a00fcd2
commit
27135d5c5d
1 changed files with 10 additions and 1 deletions
|
@ -2353,7 +2353,16 @@ static void P_LoopSidedefs (bool firstloop)
|
|||
// instead of as part of another loop
|
||||
if (line->frontsector == line->backsector)
|
||||
{
|
||||
right = DWORD(line->sidedef[!sidetemp[i].b.lineside] - sides);
|
||||
const side_t* const rightside = line->sidedef[!sidetemp[i].b.lineside];
|
||||
|
||||
if (NULL == rightside)
|
||||
{
|
||||
// There is no right side!
|
||||
if (firstloop) Printf ("Line %d's right edge is unconnected\n", linemap[unsigned(line-lines)]);
|
||||
continue;
|
||||
}
|
||||
|
||||
right = DWORD(rightside - sides);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue