Check if current path is null for path construction operators

This commit is contained in:
BobLd
2020-04-05 11:07:02 +01:00
committed by Eliot Jones
parent 9a2a72ea2e
commit 60595e1341
4 changed files with 8 additions and 0 deletions

View File

@@ -41,6 +41,8 @@
/// <inheritdoc />
public void Run(IOperationContext operationContext)
{
if (operationContext.CurrentSubpath == null) return;
var endPoint = operationContext.CurrentTransformationMatrix.Transform(new PdfPoint(X, Y));
operationContext.CurrentSubpath.LineTo(endPoint.X, endPoint.Y);
operationContext.CurrentPosition = endPoint;