[cairo] quartz image surface crashes because of missing call to reference (with patch)

Fred Bca fredbca21 at gmail.com
Tue Jan 5 12:53:47 UTC 2021


Hi,

I am not sure if it is still the process to post patches on the
mailing list, but I hope so. The recent merge request #52
(https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/52)
causes crashes because of a missing call to cairo_surface_reference in
cairo_quartz_image_surface_create (since the original surface is
destroyed by the quartz_image_surface, it should be referenced first).
Please find a patch below to fix the problem:

--- cairo-quartz-image-surface.c
+++ cairo-quartz-image-surface.c
@@ -373,0 +374,2 @@ cairo_quartz_image_surface_create (cairo_surface_t
+    // reference image surface - will be released in surface_destroy
+    cairo_surface_reference (surface);


More information about the cairo mailing list