1
0
Fork 0
mirror of https://github.com/sbrl/Nibriboard.git synced 2018-01-10 21:33:49 +00:00

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

View file

@ -204,6 +204,10 @@ namespace Nibriboard.RippleSpace
public async Task AddLine(DrawnLine newLine) 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; List<DrawnLine> chunkedLineParts;
// Split the line up into chunked pieces if neccessary // Split the line up into chunked pieces if neccessary
if(newLine.SpansMultipleChunks) if(newLine.SpansMultipleChunks)