[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.
This commit is contained in:
Chris Wilson 2008-04-10 16:48:42 +01:00
parent f6834dacef
commit b72fe9bb5f

View file

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