From b72fe9bb5ff20bfc3d30a8a4bb353e52818b5fb7 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 10 Apr 2008 16:48:42 +0100 Subject: [PATCH] [cairo-arc] Check that the context is not error before proceeding. We depend on values stored on the context that become invalid upon an error, so stop processing as soon as an error occurs. Prior to adjusting, the values returned from the error context, this would cause an infinite loop whilst calculating the number of segments required for a tolerance of 0. --- src/cairo-arc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/cairo-arc.c b/src/cairo-arc.c index 89e6ce1a6..523297062 100644 --- a/src/cairo-arc.c +++ b/src/cairo-arc.c @@ -181,6 +181,9 @@ _cairo_arc_in_direction (cairo_t *cr, double angle_max, cairo_direction_t dir) { + if (cairo_status (cr)) + return; + while (angle_max - angle_min > 4 * M_PI) angle_max -= 2 * M_PI;