diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2008-11-21 15:27:31 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2008-11-25 10:14:25 +0000 |
commit | b6bf047494fc308fff00d818b2920d8ba4aa7aed (patch) | |
tree | 4653fbbea7a68d44ba11bf10d3096335a24b74f8 /src | |
parent | 721cad9b24c2ad049320950d231ed84046c5b8ab (diff) |
[clip] Check for error surface
The update to use a NULL backend with an error surface broke creating a
context from an error surface.
Diffstat (limited to 'src')
-rw-r--r-- | src/cairo-clip.c | 2 | ||||
-rw-r--r-- | src/cairo.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/cairo-clip.c b/src/cairo-clip.c index 726896e8..83ba28c1 100644 --- a/src/cairo-clip.c +++ b/src/cairo-clip.c @@ -49,7 +49,7 @@ _cairo_clip_path_destroy (cairo_clip_path_t *clip_path); void _cairo_clip_init (cairo_clip_t *clip, cairo_surface_t *target) { - if (target) + if (target && target->backend) clip->mode = _cairo_surface_get_clip_mode (target); else clip->mode = CAIRO_CLIP_MODE_MASK; diff --git a/src/cairo.c b/src/cairo.c index f53d0b03..c80589d2 100644 --- a/src/cairo.c +++ b/src/cairo.c @@ -166,8 +166,8 @@ cairo_create (cairo_surface_t *target) cr->gstate = cr->gstate_tail; cr->gstate_freelist = NULL; - status = _cairo_gstate_init (cr->gstate, target); + status = _cairo_gstate_init (cr->gstate, target); if (status) _cairo_set_error (cr, status); |