From 5ded4479d6ddbbe16c631144ef987c4c02e706a6 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Thu, 31 May 2007 15:35:14 -0700 Subject: [PATCH] Fix return value of cairo_surface_write_to_png for unsupported formats For some reason this was returning CAIRO_STATUS_NULL_POINTER. Now fixed to return CAIRO_STATUS_INVALID_FORMAT. --- src/cairo-png.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cairo-png.c b/src/cairo-png.c index 76e901f67..35db3d9aa 100644 --- a/src/cairo-png.c +++ b/src/cairo-png.c @@ -175,7 +175,7 @@ write_png (cairo_surface_t *surface, png_color_type = PNG_COLOR_TYPE_GRAY; break; default: - status = CAIRO_STATUS_NULL_POINTER; + status = CAIRO_STATUS_INVALID_FORMAT; goto BAIL3; }