diff --git a/src/Triangle/NewLocation.cs b/src/Triangle/NewLocation.cs index c281c36..12c4f8c 100644 --- a/src/Triangle/NewLocation.cs +++ b/src/Triangle/NewLocation.cs @@ -2290,6 +2290,12 @@ namespace TriangleNet // now the second point is the neighbor's third vertex second_x = returnPoint[0]; second_y = returnPoint[1]; + + if (numvertices == points.Length) + { + Array.Resize(ref points, numvertices * 2); + } + // add a new point to the list of surrounding points points[numvertices] = returnPoint[0]; numvertices++;