Fix broken error-checking in cairo_{ps,pdf}_surface_set_dpi

This commit is contained in:
Carl Worth 2006-04-24 12:40:30 -07:00
parent 12c4c375af
commit 28e25e1cce
2 changed files with 2 additions and 2 deletions

View file

@ -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;
}

View file

@ -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;
}