gfx/cairo/fix-clip-copy.patch

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 commit f49a9740350d2f0d69ed59e913f0263a899cfb2a
     2 Author: Jeff Muizelaar <jmuizelaar@mozilla.com>
     3 Date:   Fri Jan 29 14:39:24 2010 -0500
     5     Fix clip copy
     7 diff --git a/src/cairo-clip.c b/src/cairo-clip.c
     8 index 8d66a5f..6acbcff 100644
     9 --- a/src/cairo-clip.c
    10 +++ b/src/cairo-clip.c
    11 @@ -280,13 +280,12 @@ cairo_clip_t *
    12  _cairo_clip_init_copy (cairo_clip_t *clip, cairo_clip_t *other)
    13  {
    14      if (other != NULL) {
    15 -	if (other->path == NULL) {
    16 -	    _cairo_clip_init (clip);
    17 -	    clip = NULL;
    18 -	} else {
    19 -	    clip->all_clipped = other->all_clipped;
    20 -	    clip->path = _cairo_clip_path_reference (other->path);
    21 -	}
    22 +	clip->all_clipped = other->all_clipped;
    23 +	clip->path = _cairo_clip_path_reference (other->path);
    24 +
    25 +	/* this guy is here because of the weird return semantics of _cairo_clip_init_copy */
    26 +	if (!other->path)
    27 +	    return NULL;
    28      } else {
    29  	_cairo_clip_init (clip);
    30      }

mercurial