diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2008-10-17 15:50:25 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2008-10-18 09:55:06 +0100 |
commit | 546fbc2c0cf87abd627477056bf19063c5aa001a (patch) | |
tree | ceadd6ffa733b995bcd13e6acb49c786029d344d /test/smask-paint.c | |
parent | 8bd69132827fa539d9dfb65bd00e00c079827360 (diff) |
[test/smask-paint] Propagate error.
Use cairo_get_target() to propagate errors from the secondary context.
Diffstat (limited to 'test/smask-paint.c')
-rw-r--r-- | test/smask-paint.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/smask-paint.c b/test/smask-paint.c index d0b9e945c..8378964de 100644 --- a/test/smask-paint.c +++ b/test/smask-paint.c @@ -45,6 +45,7 @@ draw (cairo_t *cr, int width, int height) CAIRO_CONTENT_ALPHA, width, height); cr2 = cairo_create (mask); + cairo_surface_destroy (mask); cairo_save (cr2); { cairo_set_operator (cr2, CAIRO_OPERATOR_CLEAR); @@ -61,7 +62,6 @@ draw (cairo_t *cr, int width, int height) cairo_pattern_destroy (pattern); cairo_paint (cr2); - cairo_destroy (cr2); cairo_set_source_rgb (cr, 0, 0, 1.0); cairo_paint (cr); @@ -76,8 +76,8 @@ draw (cairo_t *cr, int width, int height) cairo_set_source (cr, pattern); cairo_pattern_destroy (pattern); - cairo_mask_surface (cr, mask, 0, 0); - cairo_surface_destroy (mask); + cairo_mask_surface (cr, cairo_get_target (cr2), 0, 0); + cairo_destroy (cr2); return CAIRO_TEST_SUCCESS; } |