summaryrefslogtreecommitdiff
path: root/src/cairo-path-fixed.c
diff options
context:
space:
mode:
authorAndrea Canciani <ranma42@gmail.com>2010-10-17 11:56:49 +0200
committerAndrea Canciani <ranma42@gmail.com>2010-10-29 17:31:23 +0200
commit17fef2fe4ddcba8d0811922f012add50109eb0e2 (patch)
tree3ada6c4e1371ca352e41d09f0c121b112e9bb800 /src/cairo-path-fixed.c
parent568a975a62fde8d4dfaef2086c4f40e3354ba43b (diff)
path: Make _cairo_path_fixed_last_op assert on empty path
_cairo_path_fixed_last_op should now only be used on non-empty path (to test if the previous operation was a line_to).
Diffstat (limited to 'src/cairo-path-fixed.c')
-rw-r--r--src/cairo-path-fixed.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/cairo-path-fixed.c b/src/cairo-path-fixed.c
index 5b2bcbef6..812728bc4 100644
--- a/src/cairo-path-fixed.c
+++ b/src/cairo-path-fixed.c
@@ -375,8 +375,7 @@ _cairo_path_fixed_last_op (cairo_path_fixed_t *path)
cairo_path_buf_t *buf;
buf = cairo_path_tail (path);
- if (buf->num_ops == 0)
- return -1;
+ assert (buf->num_ops != 0);
return buf->op[buf->num_ops - 1];
}