[cairo-commit] src/cairo-surface-snapshot.c

Chris Wilson ickle at kemper.freedesktop.org
Tue Apr 27 03:10:05 PDT 2010


 src/cairo-surface-snapshot.c |   11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

New commits:
commit 514d366cde689f8200b049834bebbd421d5d8bcb
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Tue Apr 27 11:07:09 2010 +0100

    snapshot: propagate status on finish

diff --git a/src/cairo-surface-snapshot.c b/src/cairo-surface-snapshot.c
index 2f3b792..4277f66 100644
--- a/src/cairo-surface-snapshot.c
+++ b/src/cairo-surface-snapshot.c
@@ -46,11 +46,16 @@ static cairo_status_t
 _cairo_surface_snapshot_finish (void *abstract_surface)
 {
     cairo_surface_snapshot_t *surface = abstract_surface;
+    cairo_status_t status = CAIRO_STATUS_SUCCESS;
 
-    cairo_surface_finish (surface->clone);
-    cairo_surface_destroy (surface->clone);
+    if (surface->clone != NULL) {
+	cairo_surface_finish (surface->clone);
+	status = surface->clone->status;
 
-    return CAIRO_STATUS_SUCCESS;
+	cairo_surface_destroy (surface->clone);
+    }
+
+    return status;
 }
 
 static cairo_status_t


More information about the cairo-commit mailing list