summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2010-07-05 18:25:16 +0200
committerBenjamin Otte <otte@redhat.com>2010-07-05 18:38:33 +0200
commit8fd1ecea12f15c2bda710065909a14415ba92bd8 (patch)
tree869feccf57ad04b34a38f2f9c0655236d98a638a
parente388ff1ae732970d6166780817ec121cf58ccd0e (diff)
surface: Fail if set_mime_data() is called on a finished surface
Caught by api-special-cases test
-rw-r--r--src/cairo-surface.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cairo-surface.c b/src/cairo-surface.c
index d0e3a55c..a5439c2a 100644
--- a/src/cairo-surface.c
+++ b/src/cairo-surface.c
@@ -857,6 +857,8 @@ 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);
status = _cairo_intern_string (&mime_type, -1);
if (unlikely (status))