mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 21:38:03 +02:00
pdf: Set error when extracting from finished surface
Caught by api-special-cases test
This commit is contained in:
parent
702aa19fda
commit
106357f6e2
1 changed files with 10 additions and 0 deletions
|
|
@ -498,6 +498,11 @@ _extract_pdf_surface (cairo_surface_t *surface,
|
|||
|
||||
if (surface->status)
|
||||
return FALSE;
|
||||
if (surface->finished) {
|
||||
status_ignored = _cairo_surface_set_error (surface,
|
||||
_cairo_error (CAIRO_STATUS_SURFACE_FINISHED));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (! _cairo_surface_is_paginated (surface)) {
|
||||
status_ignored = _cairo_surface_set_error (surface,
|
||||
|
|
@ -511,6 +516,11 @@ _extract_pdf_surface (cairo_surface_t *surface,
|
|||
target->status);
|
||||
return FALSE;
|
||||
}
|
||||
if (target->finished) {
|
||||
status_ignored = _cairo_surface_set_error (surface,
|
||||
_cairo_error (CAIRO_STATUS_SURFACE_FINISHED));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (! _cairo_surface_is_pdf (target)) {
|
||||
status_ignored = _cairo_surface_set_error (surface,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue