[cairo-commit] src/cairo-clip.c

Chris Wilson ickle at kemper.freedesktop.org
Mon Jul 12 10:54:14 PDT 2010


 src/cairo-clip.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit f53f072a223c3fbdeba315f5cba755cba498e121
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Mon Jul 12 18:53:29 2010 +0100

    clip: Do the NULL check before the dereference.
    
    Breakage introduced in the commit earlier today.

diff --git a/src/cairo-clip.c b/src/cairo-clip.c
index 3bd7edc..12dc04d 100644
--- a/src/cairo-clip.c
+++ b/src/cairo-clip.c
@@ -1108,11 +1108,12 @@ cairo_bool_t
 _cairo_clip_contains_rectangle (cairo_clip_t *clip,
 				const cairo_rectangle_int_t *rect)
 {
-    cairo_clip_path_t *clip_path = clip->path;
+    cairo_clip_path_t *clip_path;
 
     if (clip == NULL)
 	return FALSE;
 
+    clip_path = clip->path;
     if (clip_path->extents.x > rect->x ||
 	clip_path->extents.y > rect->y ||
 	clip_path->extents.x + clip_path->extents.width  < rect->x + rect->width ||


More information about the cairo-commit mailing list