fixed crash in Make Sector mode on empty map

This commit is contained in:
codeimp 2008-10-28 10:38:31 +00:00
parent c184901b5e
commit d514c8837a

View file

@ -144,6 +144,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
{
// Highlighting from a new sidedef?
Linedef nl = General.Map.Map.NearestLinedef(mousemappos);
if(nl != null)
{
float side = nl.SideOfLine(mousemappos);
newnearest = new LinedefSide(nl, (side <= 0.0f));
if(newnearest != nearestside)
@ -179,6 +181,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
renderer.Present();
}
}
}
else
{
// No valid region