Fixed a crash that would happen when the line slope things (9500/9501) are used but the linedef they are tagged to doesn't have a front sidedef. Fixes #398.

This commit is contained in:
biwa 2020-04-10 12:11:42 +02:00
parent 999d5ade9e
commit ac73ca7422

View file

@ -1039,7 +1039,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
foreach(Linedef ld in linetags[t.Args[0]]) foreach(Linedef ld in linetags[t.Args[0]])
{ {
if (ld.Line.GetSideOfLine(t.Position) < 0.0f) if (ld.Line.GetSideOfLine(t.Position) < 0.0f)
GetSectorData(ld.Front.Sector).AddEffectThingLineSlope(t, ld.Front); {
if(ld.Front != null)
GetSectorData(ld.Front.Sector).AddEffectThingLineSlope(t, ld.Front);
}
else if (ld.Back != null) else if (ld.Back != null)
GetSectorData(ld.Back.Sector).AddEffectThingLineSlope(t, ld.Back); GetSectorData(ld.Back.Sector).AddEffectThingLineSlope(t, ld.Back);
} }