[cairo-commit] test/imagediff.c
Benjamin Otte
company at kemper.freedesktop.org
Thu Oct 9 04:22:17 PDT 2008
test/imagediff.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
New commits:
commit c647c0bbca8694a14f5f5807b8349f0b0bb4987d
Author: Benjamin Otte <otte at gnome.org>
Date: Thu Oct 9 13:21:27 2008 +0200
[TEST] make imagediff work again
It seems to have bitrotten
diff --git a/test/imagediff.c b/test/imagediff.c
index 1cbd1b7..424ca6d 100644
--- a/test/imagediff.c
+++ b/test/imagediff.c
@@ -228,17 +228,18 @@ png_diff (const char *filename_a,
surface_a, surface_b, surface_diff,
result);
- cairo_surface_destroy (surface_a);
- cairo_surface_destroy (surface_b);
- cairo_surface_destroy (surface_diff);
+ if (filename_diff)
+ _xunlink (filename_diff);
- _xunlink (filename_diff);
if (status == CAIRO_STATUS_SUCCESS &&
result->pixels_changed)
{
status = write_png (surface_diff, filename_diff);
}
+ cairo_surface_destroy (surface_a);
+ cairo_surface_destroy (surface_b);
+ cairo_surface_destroy (surface_diff);
return status;
}
More information about the cairo-commit
mailing list