gfx/cairo/fix-clip-copy.patch

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gfx/cairo/fix-clip-copy.patch	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,30 @@
     1.4 +commit f49a9740350d2f0d69ed59e913f0263a899cfb2a
     1.5 +Author: Jeff Muizelaar <jmuizelaar@mozilla.com>
     1.6 +Date:   Fri Jan 29 14:39:24 2010 -0500
     1.7 +
     1.8 +    Fix clip copy
     1.9 +
    1.10 +diff --git a/src/cairo-clip.c b/src/cairo-clip.c
    1.11 +index 8d66a5f..6acbcff 100644
    1.12 +--- a/src/cairo-clip.c
    1.13 ++++ b/src/cairo-clip.c
    1.14 +@@ -280,13 +280,12 @@ cairo_clip_t *
    1.15 + _cairo_clip_init_copy (cairo_clip_t *clip, cairo_clip_t *other)
    1.16 + {
    1.17 +     if (other != NULL) {
    1.18 +-	if (other->path == NULL) {
    1.19 +-	    _cairo_clip_init (clip);
    1.20 +-	    clip = NULL;
    1.21 +-	} else {
    1.22 +-	    clip->all_clipped = other->all_clipped;
    1.23 +-	    clip->path = _cairo_clip_path_reference (other->path);
    1.24 +-	}
    1.25 ++	clip->all_clipped = other->all_clipped;
    1.26 ++	clip->path = _cairo_clip_path_reference (other->path);
    1.27 ++
    1.28 ++	/* this guy is here because of the weird return semantics of _cairo_clip_init_copy */
    1.29 ++	if (!other->path)
    1.30 ++	    return NULL;
    1.31 +     } else {
    1.32 + 	_cairo_clip_init (clip);
    1.33 +     }

mercurial