michael@0: commit f49a9740350d2f0d69ed59e913f0263a899cfb2a michael@0: Author: Jeff Muizelaar michael@0: Date: Fri Jan 29 14:39:24 2010 -0500 michael@0: michael@0: Fix clip copy michael@0: michael@0: diff --git a/src/cairo-clip.c b/src/cairo-clip.c michael@0: index 8d66a5f..6acbcff 100644 michael@0: --- a/src/cairo-clip.c michael@0: +++ b/src/cairo-clip.c michael@0: @@ -280,13 +280,12 @@ cairo_clip_t * michael@0: _cairo_clip_init_copy (cairo_clip_t *clip, cairo_clip_t *other) michael@0: { michael@0: if (other != NULL) { michael@0: - if (other->path == NULL) { michael@0: - _cairo_clip_init (clip); michael@0: - clip = NULL; michael@0: - } else { michael@0: - clip->all_clipped = other->all_clipped; michael@0: - clip->path = _cairo_clip_path_reference (other->path); michael@0: - } michael@0: + clip->all_clipped = other->all_clipped; michael@0: + clip->path = _cairo_clip_path_reference (other->path); michael@0: + michael@0: + /* this guy is here because of the weird return semantics of _cairo_clip_init_copy */ michael@0: + if (!other->path) michael@0: + return NULL; michael@0: } else { michael@0: _cairo_clip_init (clip); michael@0: }