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

Fred Bca fredbca21 at gmail.com
Tue Jan 5 14:36:52 UTC 2021


Thank you!

On Tue, Jan 5, 2021 at 3:22 PM Heiko Lewin <hlewin at gmx.de> wrote:
>
> Hello!
>
> I have created
> https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/102 from this.
>
> Thank you for pointing out the issue.
>
>
> On 1/5/21 1:53 PM, Fred Bca wrote:
> > 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);
> --
> cairo mailing list
> cairo at cairographics.org
> https://lists.cairographics.org/mailman/listinfo/cairo


More information about the cairo mailing list