diff options
author | Benjamin Otte <otte@redhat.com> | 2010-07-05 18:25:31 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2010-07-05 18:38:33 +0200 |
commit | 6744b78de17930285569da2158a334763e2bd333 (patch) | |
tree | 2c5332db4d814c426f535473f0ea2907a35f0308 /src | |
parent | 8fd1ecea12f15c2bda710065909a14415ba92bd8 (diff) |
subsurface: Fail if created from a finished surface
Caught by api-special-cases test
Diffstat (limited to 'src')
-rw-r--r-- | src/cairo-surface-subsurface.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cairo-surface-subsurface.c b/src/cairo-surface-subsurface.c index c8d785bd..f39dcd29 100644 --- a/src/cairo-surface-subsurface.c +++ b/src/cairo-surface-subsurface.c @@ -496,6 +496,8 @@ 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); surface = malloc (sizeof (cairo_surface_subsurface_t)); if (unlikely (surface == NULL)) |