mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 13:28:03 +02:00
Fix broken error-checking in cairo_{ps,pdf}_surface_set_dpi
This commit is contained in:
parent
12c4c375af
commit
28e25e1cce
2 changed files with 2 additions and 2 deletions
|
|
@ -425,7 +425,7 @@ cairo_pdf_surface_set_dpi (cairo_surface_t *surface,
|
|||
|
||||
target = _cairo_paginated_surface_get_target (surface);
|
||||
|
||||
if (! _cairo_surface_is_pdf (surface)) {
|
||||
if (! _cairo_surface_is_pdf (target)) {
|
||||
_cairo_error (CAIRO_STATUS_SURFACE_TYPE_MISMATCH);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -670,7 +670,7 @@ cairo_ps_surface_set_dpi (cairo_surface_t *surface,
|
|||
|
||||
target = _cairo_paginated_surface_get_target (surface);
|
||||
|
||||
if (! _cairo_surface_is_ps (surface)) {
|
||||
if (! _cairo_surface_is_ps (target)) {
|
||||
_cairo_error (CAIRO_STATUS_SURFACE_TYPE_MISMATCH);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue