mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-06-03 22:08:18 +02:00
surface: Fail early if create_similar() is called on a finished surface
Caught by api-special-cases test
This commit is contained in:
parent
c1689ef6f2
commit
e388ff1ae7
1 changed files with 2 additions and 0 deletions
|
|
@ -453,6 +453,8 @@ cairo_surface_create_similar (cairo_surface_t *other,
|
|||
{
|
||||
if (unlikely (other->status))
|
||||
return _cairo_surface_create_in_error (other->status);
|
||||
if (unlikely (other->finished))
|
||||
return _cairo_surface_create_in_error (CAIRO_STATUS_SURFACE_FINISHED);
|
||||
|
||||
if (unlikely (! CAIRO_CONTENT_VALID (content)))
|
||||
return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_INVALID_CONTENT));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue