From 243938c61a08dac8911153352e55933e0618581e Mon Sep 17 00:00:00 2001 From: John Ralls Date: Sat, 23 Apr 2022 16:38:01 -0700 Subject: [PATCH] [quartz] Destroy local copy of snapshot after attaching it. Because cairo_surface_snapshot_attach refs the snapshot. Fixes https://gitlab.freedesktop.org/cairo/cairo/-/issues/562 --- src/cairo-quartz-surface.c | 1 + 1 file changed, 1 insertion(+) diff --git src/cairo-quartz-surface.c src/cairo-quartz-surface.c index 5681918c4..fa6d9b1c9 100644 --- src/cairo-quartz-surface.c +++ src/cairo-quartz-surface.c @@ -2609,6 +2609,7 @@ _cairo_quartz_surface_snapshot_get_image (cairo_quartz_surface_t *surface) if (unlikely (!snapshot || cairo_surface_status (snapshot))) return NULL; _cairo_surface_attach_snapshot (&surface->base, snapshot, NULL); + cairo_surface_destroy (snapshot); } return CGImageRetain (((cairo_quartz_snapshot_t*)snapshot)->image); -- GitLab