Skip to content

Commit 4f216e5

Browse files
committed
ensure we initialize bounds and length
1 parent 46ee8bd commit 4f216e5

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/ImageSharp.Drawing/Shapes/InternalPath.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,11 @@ private InternalPath(PointData[] points, bool isClosedPath)
8686
this.Bounds = new RectangleF(minX, minY, maxX - minX, maxY - minY);
8787
this.Length = this.points.Sum(x => x.Length);
8888
}
89+
else
90+
{
91+
this.Bounds = RectangleF.Empty;
92+
this.Length = 0;
93+
}
8994
}
9095

9196
/// <summary>

0 commit comments

Comments
 (0)