summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2007-04-08 21:47:01 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2007-04-09 15:08:45 +0100
commit2f2bff038cb0e59865a0405b19da4805213d718e (patch)
tree96b0e0105487d89db9003e49476c7c71a9d9c147
parent79424fc64640db4b518eaf4a23477f1bbc26db5a (diff)
buffer-diff - check for any errors whilst writing the png
Propagate any errors from writing out the png.
-rw-r--r--test/buffer-diff.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/buffer-diff.c b/test/buffer-diff.c
index d111b238..abb7e33b 100644
--- a/test/buffer-diff.c
+++ b/test/buffer-diff.c
@@ -339,6 +339,7 @@ image_diff_core (const char *filename_a,
compare_surfaces (surface_a, surface_b, surface_diff, result);
+ status = CAIRO_STATUS_SUCCESS;
if (result->pixels_changed) {
FILE *png_file;
@@ -347,7 +348,7 @@ image_diff_core (const char *filename_a,
else
png_file = stdout;
- cairo_surface_write_to_png_stream (surface_diff, stdio_write_func, png_file);
+ status = cairo_surface_write_to_png_stream (surface_diff, stdio_write_func, png_file);
if (png_file != stdout)
fclose (png_file);
@@ -360,7 +361,7 @@ image_diff_core (const char *filename_a,
cairo_surface_destroy (surface_b);
cairo_surface_destroy (surface_diff);
- return CAIRO_STATUS_SUCCESS;
+ return status;
}
cairo_status_t