mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 18:08:03 +02:00
spans-compositor: Only destroy the clip if we made the copy
The extents->clip may be replaced elsewhere and so we cannot assume that simply because it changed from the stashed value, that it was us that made that copy. So becareful to only free our copy. Fixes a double-free of a clip after a complex fallback operation. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
94a9e06a93
commit
d67f02e23e
1 changed files with 2 additions and 2 deletions
|
|
@ -984,7 +984,7 @@ _cairo_spans_compositor_stroke (const cairo_compositor_t *_compositor,
|
|||
status = clip_and_composite_polygon (compositor, extents, &polygon,
|
||||
fill_rule, antialias);
|
||||
|
||||
if (extents->clip != saved_clip) {
|
||||
if (extents->is_bounded) {
|
||||
_cairo_clip_destroy (extents->clip);
|
||||
extents->clip = saved_clip;
|
||||
}
|
||||
|
|
@ -1056,7 +1056,7 @@ _cairo_spans_compositor_fill (const cairo_compositor_t *_compositor,
|
|||
status = clip_and_composite_polygon (compositor, extents, &polygon,
|
||||
fill_rule, antialias);
|
||||
|
||||
if (extents->clip != saved_clip) {
|
||||
if (extents->is_bounded) {
|
||||
_cairo_clip_destroy (extents->clip);
|
||||
extents->clip = saved_clip;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue