From 866b2296b4a8b347011f1c8ae2e0f3a987a29d0c Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Tue, 10 Apr 2007 14:09:56 -0700 Subject: [PATCH] test-meta-surface: Add missing checks for errors from _cairo_meta_surface_replay --- src/test-meta-surface.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/test-meta-surface.c b/src/test-meta-surface.c index d686881f1..1c5bad0d0 100644 --- a/src/test-meta-surface.c +++ b/src/test-meta-surface.c @@ -144,11 +144,14 @@ static cairo_int_status_t _test_meta_surface_show_page (void *abstract_surface) { test_meta_surface_t *surface = abstract_surface; + cairo_status_t status; if (surface->image_reflects_meta) return CAIRO_STATUS_SUCCESS; - _cairo_meta_surface_replay (surface->meta, surface->image); + status = _cairo_meta_surface_replay (surface->meta, surface->image); + if (status) + return status; surface->image_reflects_meta = TRUE; @@ -280,6 +283,7 @@ static cairo_surface_t * _test_meta_surface_snapshot (void *abstract_other) { test_meta_surface_t *other = abstract_other; + cairo_status_t status; /* XXX: Just making a snapshot of other->meta is what we really * want. But this currently triggers a bug somewhere (the "mask" @@ -306,7 +310,9 @@ _test_meta_surface_snapshot (void *abstract_other) extents.width, extents.height); - _cairo_meta_surface_replay (other->meta, surface); + status = _cairo_meta_surface_replay (other->meta, surface); + if (status) + return (cairo_surface_t*) &_cairo_surface_nil; return surface; #endif