mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-03 03:07:58 +02:00
[cairo-svg-surface] Check surface status before extracting the svg target.
We need to check and report the existent status, else we may try to modify the inert error object.
This commit is contained in:
parent
013bbda637
commit
0cd42c25a6
1 changed files with 5 additions and 0 deletions
|
|
@ -233,10 +233,15 @@ _extract_svg_surface (cairo_surface_t *surface,
|
|||
{
|
||||
cairo_surface_t *target;
|
||||
|
||||
if (surface->status)
|
||||
return surface->status;
|
||||
|
||||
if (! _cairo_surface_is_paginated (surface))
|
||||
return _cairo_error (CAIRO_STATUS_SURFACE_TYPE_MISMATCH);
|
||||
|
||||
target = _cairo_paginated_surface_get_target (surface);
|
||||
if (target->status)
|
||||
return target->status;
|
||||
|
||||
if (! _cairo_surface_is_svg (target))
|
||||
return _cairo_error (CAIRO_STATUS_SURFACE_TYPE_MISMATCH);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue