Call _cairo_error() when setting the FINISHED error on surfaces

This commit is contained in:
Benjamin Otte 2010-07-05 22:41:43 +02:00
parent 19da8e138d
commit 448653e7b9
2 changed files with 7 additions and 7 deletions

View file

@ -497,7 +497,7 @@ cairo_surface_create_for_rectangle (cairo_surface_t *target,
if (unlikely (target->status))
return _cairo_surface_create_in_error (target->status);
if (unlikely (target->finished))
return _cairo_surface_create_in_error (CAIRO_STATUS_SURFACE_FINISHED);
return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_SURFACE_FINISHED));
surface = malloc (sizeof (cairo_surface_subsurface_t));
if (unlikely (surface == NULL))

View file

@ -858,7 +858,7 @@ cairo_surface_set_mime_data (cairo_surface_t *surface,
if (unlikely (surface->status))
return surface->status;
if (surface->finished)
return _cairo_surface_set_error (surface, CAIRO_STATUS_SURFACE_FINISHED);
return _cairo_surface_set_error (surface, _cairo_error (CAIRO_STATUS_SURFACE_FINISHED));
status = _cairo_intern_string (&mime_type, -1);
if (unlikely (status))
@ -954,7 +954,7 @@ _cairo_surface_set_font_options (cairo_surface_t *surface,
if (surface->finished) {
status = _cairo_surface_set_error (surface,
CAIRO_STATUS_SURFACE_FINISHED);
_cairo_error (CAIRO_STATUS_SURFACE_FINISHED));
return;
}
@ -1083,7 +1083,7 @@ cairo_surface_mark_dirty_rectangle (cairo_surface_t *surface,
assert (surface->snapshot_of == NULL);
if (surface->finished) {
status = _cairo_surface_set_error (surface, CAIRO_STATUS_SURFACE_FINISHED);
status = _cairo_surface_set_error (surface, _cairo_error (CAIRO_STATUS_SURFACE_FINISHED));
return;
}
@ -1142,7 +1142,7 @@ _cairo_surface_set_device_scale (cairo_surface_t *surface,
assert (surface->snapshot_of == NULL);
if (surface->finished) {
status = _cairo_surface_set_error (surface, CAIRO_STATUS_SURFACE_FINISHED);
status = _cairo_surface_set_error (surface, _cairo_error (CAIRO_STATUS_SURFACE_FINISHED));
return;
}
@ -1192,7 +1192,7 @@ cairo_surface_set_device_offset (cairo_surface_t *surface,
assert (surface->snapshot_of == NULL);
if (surface->finished) {
status = _cairo_surface_set_error (surface, CAIRO_STATUS_SURFACE_FINISHED);
status = _cairo_surface_set_error (surface, _cairo_error (CAIRO_STATUS_SURFACE_FINISHED));
return;
}
@ -1279,7 +1279,7 @@ cairo_surface_set_fallback_resolution (cairo_surface_t *surface,
assert (surface->snapshot_of == NULL);
if (surface->finished) {
status = _cairo_surface_set_error (surface, CAIRO_STATUS_SURFACE_FINISHED);
status = _cairo_surface_set_error (surface, _cairo_error (CAIRO_STATUS_SURFACE_FINISHED));
return;
}