[cairo] Crash when redirecting gstate

Miklós Erdélyi erdelyim at gmail.com
Fri Aug 25 06:52:31 PDT 2006

Hi all,

I noticed that in certain cases Cairo crashed when drawing an SVG file
with Inkscape (usually one using masks and multiple layers so there
are calls to cairo_push_group/pop_group). I found that the cause of
this was that _cairo_clip_init_deep_copy was passing a NULL
cairo_surface_t to cairo_surface_create_similar. Looking at the source
I suspect there's been a typo committed there:
        if (other->surface) {
            _cairo_surface_clone_similar (target, clip->surface,
instead of using:
        if (other->surface) {
            _cairo_surface_clone_similar (target, other->surface,
[then why check other->surface?]
This can be corrected with the attached patch. It's strange though it
hasn't surfaced yet. Or may I be missing something?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: clip_patch.bin
Type: application/octet-stream
Size: 464 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20060825/0f75f65b/clip_patch.bin

More information about the cairo mailing list