Added safeguard to MapSet.NearestLinedefRange if selectionmap is null. Might fix #529.

This commit is contained in:
biwa 2021-02-20 13:11:03 +01:00
parent 467f791bd3
commit b168570241

View file

@ -3401,6 +3401,9 @@ namespace CodeImp.DoomBuilder.Map
/// <summary>This finds the line closest to the specified position.</summary>
public static Linedef NearestLinedefRange(BlockMap<BlockEntry> selectionmap, Vector2D pos, double maxrange) //mxd
{
if (selectionmap == null)
return null;
Linedef closest = null;
double distance = double.MaxValue;
double maxrangesq = maxrange * maxrange;