1
0
Fork 0

Fix exception when a client tries to add a line with no points

This commit is contained in:
Starbeamrainbowlabs 2017-07-29 20:43:17 +01:00
parent a7fd57d1e6
commit d6b4b50588
1 changed files with 4 additions and 0 deletions

View File

@ -204,6 +204,10 @@ namespace Nibriboard.RippleSpace
public async Task AddLine(DrawnLine newLine)
{
if(newLine.Points.Count == 0) {
Log.WriteLine("[Plane/{0}] Lines that don't contain any points can't be added to a chunk!");
return;
}
List<DrawnLine> chunkedLineParts;
// Split the line up into chunked pieces if neccessary
if(newLine.SpansMultipleChunks)