diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2008-10-17 20:22:49 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2008-10-18 09:55:07 +0100 |
commit | 6cdbd132ceba159bb7e3ac5612aa79293b21e95a (patch) | |
tree | 4c4d38fe5e0838e420f81fbf8c6e3645f6b6bba5 /test/source-clip.c | |
parent | f86f233b3e49c3f401b2fa02987b2193485e8be5 (diff) |
[test/source-clip] Propagate error.
Use cairo_get_target() to propagate error from the secondary context.
Diffstat (limited to 'test/source-clip.c')
-rw-r--r-- | test/source-clip.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/source-clip.c b/test/source-clip.c index b24f95c1..1f51f328 100644 --- a/test/source-clip.c +++ b/test/source-clip.c @@ -49,6 +49,7 @@ draw (cairo_t *cr, int width, int height) SIZE, SIZE); cr2 = cairo_create (source); + cairo_surface_destroy (source); /* Fill the source surface with green */ cairo_set_source_rgb (cr2, 0, 1, 0); @@ -69,11 +70,10 @@ draw (cairo_t *cr, int width, int height) cairo_paint (cr); /* Now draw the source surface onto the destination surface */ - cairo_set_source_surface (cr, source, 0, 0); + cairo_set_source_surface (cr, cairo_get_target (cr2), 0, 0); cairo_paint (cr); cairo_destroy (cr2); - cairo_surface_destroy (source); return CAIRO_TEST_SUCCESS; } |