mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2025-12-28 00:30:12 +01:00
[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:
parent
f6834dacef
commit
b72fe9bb5f
1 changed files with 3 additions and 0 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue