mirror of
https://git.do.srb2.org/STJr/ZoneBuilder.git
synced 2025-02-05 15:21:14 +00:00
Added safeguard to MapSet.NearestLinedefRange if selectionmap is null. Might fix #529.
This commit is contained in:
parent
0eee76393b
commit
c27bf325ad
1 changed files with 3 additions and 0 deletions
|
@ -3387,6 +3387,9 @@ namespace CodeImp.DoomBuilder.Map
|
||||||
/// <summary>This finds the line closest to the specified position.</summary>
|
/// <summary>This finds the line closest to the specified position.</summary>
|
||||||
public static Linedef NearestLinedefRange(BlockMap<BlockEntry> selectionmap, Vector2D pos, float maxrange) //mxd
|
public static Linedef NearestLinedefRange(BlockMap<BlockEntry> selectionmap, Vector2D pos, float maxrange) //mxd
|
||||||
{
|
{
|
||||||
|
if (selectionmap == null)
|
||||||
|
return null;
|
||||||
|
|
||||||
Linedef closest = null;
|
Linedef closest = null;
|
||||||
float distance = float.MaxValue;
|
float distance = float.MaxValue;
|
||||||
float maxrangesq = maxrange * maxrange;
|
float maxrangesq = maxrange * maxrange;
|
||||||
|
|
Loading…
Reference in a new issue