summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gfx/cairo/cairo/src/cairo-path-bounds.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gfx/cairo/cairo/src/cairo-path-bounds.c b/gfx/cairo/cairo/src/cairo-path-bounds.c
index c752fbca1d..701539e3a3 100644
--- a/gfx/cairo/cairo/src/cairo-path-bounds.c
+++ b/gfx/cairo/cairo/src/cairo-path-bounds.c
@@ -107,6 +107,16 @@ _cairo_path_bounder_curve_to (void *closure,
static cairo_status_t
_cairo_path_bounder_close_path (void *closure)
{
+ // XXXMC: This addition of a closure point isn't strictly needed but
+ // if our clipping extents code changes then this might cause problems
+ // if the extra point isn't added (in case of 0-length paths).
+ cairo_path_bounder_t *bounder = closure;
+
+ if (bounder->has_initial_point) {
+ _cairo_path_bounder_add_point (bounder, &bounder->current_point);
+ bounder->has_initial_point = FALSE;
+ }
+
return CAIRO_STATUS_SUCCESS;
}