Fix crash when removing a wall in the editor

Only update wall_num if != wall_none.
This commit is contained in:
Chris Taylor 2016-11-12 17:19:38 +08:00
parent 4568bbae11
commit 95fcee9474

View file

@ -663,7 +663,7 @@ int wall_remove_side(const vsegptridx_t seg, short side)
{
if (segp->segnum != segment_none)
range_for (auto &w, segp->sides)
if (w.wall_num > lower_wallnum+1)
if (w.wall_num != wall_none && w.wall_num > lower_wallnum+1)
w.wall_num -= 2;
}