Skip to content

Commit

Permalink
xcb,image: Fix a missing clip fini
Browse files Browse the repository at this point in the history
Spotted by Uli Schlachter when I copied the image glyphs clipping to
xcb.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
  • Loading branch information
Chris Wilson committed Oct 15, 2010
1 parent 22cdb70 commit 42ecc42
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/cairo-image-surface.c
Original file line number Diff line number Diff line change
Expand Up @@ -4043,8 +4043,10 @@ _cairo_image_surface_glyphs (void *abstract_surface,
if (clip != NULL && extents.is_bounded) {
clip = _cairo_clip_init_copy (&local_clip, clip);
status = _cairo_clip_rectangle (clip, &extents.bounded);
if (unlikely (status))
if (unlikely (status)) {
_cairo_clip_fini (&local_clip);
return status;
}

have_clip = TRUE;
}
Expand Down
4 changes: 3 additions & 1 deletion src/cairo-xcb-surface-render.c
Original file line number Diff line number Diff line change
Expand Up @@ -4628,8 +4628,10 @@ _cairo_xcb_surface_render_glyphs (cairo_xcb_surface_t *surface,
if (clip != NULL && extents.is_bounded) {
clip = _cairo_clip_init_copy (&local_clip, clip);
status = _cairo_clip_rectangle (clip, &extents.bounded);
if (unlikely (status))
if (unlikely (status)) {
_cairo_clip_fini (&local_clip);
return status;
}

have_clip = TRUE;
}
Expand Down

0 comments on commit 42ecc42

Please sign in to comment.