mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 05:18:01 +02:00
[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:
parent
6675cf5587
commit
4be6de9fc6
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue