From d6b4b505881faf094336315ef6d57eb750adc68b Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Sat, 29 Jul 2017 20:43:17 +0100 Subject: [PATCH] Fix exception when a client tries to add a line with no points --- Nibriboard/RippleSpace/Plane.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Nibriboard/RippleSpace/Plane.cs b/Nibriboard/RippleSpace/Plane.cs index e410f8e..9e744ff 100644 --- a/Nibriboard/RippleSpace/Plane.cs +++ b/Nibriboard/RippleSpace/Plane.cs @@ -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 chunkedLineParts; // Split the line up into chunked pieces if neccessary if(newLine.SpansMultipleChunks)