[image] Return FORMAT_INVALID for an error surface.

The default error value should be CAIRO_FORMAT_INVALID [-1] not 0 (which
corresponds to CAIRO_FORMAT_ARGB32).
This commit is contained in:
Chris Wilson 2009-04-24 10:03:20 +01:00
parent 6675cf5587
commit 4be6de9fc6

View file

@ -569,7 +569,7 @@ cairo_image_surface_get_format (cairo_surface_t *surface)
if (! _cairo_surface_is_image (surface)) {
_cairo_error_throw (CAIRO_STATUS_SURFACE_TYPE_MISMATCH);
return 0;
return CAIRO_FORMAT_INVALID;
}
return image_surface->format;