diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2009-08-10 10:57:41 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2009-08-29 08:08:32 +0100 |
commit | 3023330706b1237b0fbd697d015cad9a23c250b7 (patch) | |
tree | 7fa0e57d78d7f3a4b0983327c73f81da44a66dce /src/cairo-path-fill.c | |
parent | 9ba37a85d2f6c033d68eb547be6c63382164519e (diff) |
[fill] Early check for empty path/polygon
Diffstat (limited to 'src/cairo-path-fill.c')
-rw-r--r-- | src/cairo-path-fill.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/cairo-path-fill.c b/src/cairo-path-fill.c index 50cd2183..0cad156c 100644 --- a/src/cairo-path-fill.c +++ b/src/cairo-path-fill.c @@ -156,6 +156,9 @@ _cairo_path_fixed_fill_to_traps (const cairo_path_fixed_t *path, cairo_polygon_t polygon; cairo_status_t status; + if (path->is_empty_fill) + return CAIRO_STATUS_SUCCESS; + _cairo_polygon_init (&polygon); if (traps->has_limits) _cairo_polygon_limit (&polygon, &traps->limits); @@ -163,7 +166,7 @@ _cairo_path_fixed_fill_to_traps (const cairo_path_fixed_t *path, status = _cairo_path_fixed_fill_to_polygon (path, tolerance, &polygon); - if (unlikely (status)) + if (unlikely (status || polygon.num_edges == 0)) goto CLEANUP; if (path->is_rectilinear) { |