summaryrefslogtreecommitdiff
path: root/raster
diff options
context:
space:
mode:
Diffstat (limited to 'raster')
-rw-r--r--raster/pathstroke.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/raster/pathstroke.c b/raster/pathstroke.c
index 0143742c..37609e36 100644
--- a/raster/pathstroke.c
+++ b/raster/pathstroke.c
@@ -479,6 +479,9 @@ fz_strokepath(fz_gel *gel, fz_pathnode *path, fz_matrix ctm, float flatness, flo
i = 0;
+ if (path->len > 0 && path->els[0].k != FZ_MOVETO)
+ return fz_throw("path must begin with moveto");
+
while (i < path->len)
{
switch (path->els[i++].k)
@@ -679,6 +682,9 @@ fz_dashpath(fz_gel *gel, fz_pathnode *path, fz_matrix ctm, float flatness, float
i = 0;
+ if (path->len > 0 && path->els[0].k != FZ_MOVETO)
+ return fz_throw("path must begin with moveto");
+
while (i < path->len)
{
switch (path->els[i++].k)