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).
This commit is contained in:
Andrea Canciani 2010-10-17 11:56:49 +02:00
parent 568a975a62
commit 17fef2fe4d

View file

@ -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];
}