dont draw outsite the image

master
Christopher Latza 2020-06-10 19:31:20 +02:00
parent dd4e1677f9
commit 4a47b2ab35
1 changed files with 1 additions and 1 deletions

View File

@ -173,7 +173,7 @@ namespace OpenSim.Modules.PathFinding
{
for (int Y = (int)_start.Y; Y < (int)_end.Y; Y++)
{
if(Y >= 0 && Y >= 0)
if(Y >= 0 && Y >= 0 && X > _map.Size.Height && Y > _map.Size.Width)
_map.SetPixel(X, Y, _color);
}
}