mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-27 06:02:11 +00:00
fixed crash in Make Sector mode on empty map
This commit is contained in:
parent
c184901b5e
commit
d514c8837a
1 changed files with 27 additions and 24 deletions
|
@ -144,6 +144,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
{
|
{
|
||||||
// Highlighting from a new sidedef?
|
// Highlighting from a new sidedef?
|
||||||
Linedef nl = General.Map.Map.NearestLinedef(mousemappos);
|
Linedef nl = General.Map.Map.NearestLinedef(mousemappos);
|
||||||
|
if(nl != null)
|
||||||
|
{
|
||||||
float side = nl.SideOfLine(mousemappos);
|
float side = nl.SideOfLine(mousemappos);
|
||||||
newnearest = new LinedefSide(nl, (side <= 0.0f));
|
newnearest = new LinedefSide(nl, (side <= 0.0f));
|
||||||
if(newnearest != nearestside)
|
if(newnearest != nearestside)
|
||||||
|
@ -179,6 +181,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
renderer.Present();
|
renderer.Present();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// No valid region
|
// No valid region
|
||||||
|
|
Loading…
Reference in a new issue