[cairo-commit] src/cairo-pdf-surface.c src/cairo-ps-surface.c

Carl Worth cworth at kemper.freedesktop.org
Mon Apr 24 12:43:38 PDT 2006


 src/cairo-pdf-surface.c |    2 +-
 src/cairo-ps-surface.c  |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
diff-tree 28e25e1cce0a4e4c612743effb8927c5cb6b3c5b (from 12c4c375af7efe367bb6128babd14b4c1d05be65)
Author: Carl Worth <cworth at cworth.org>
Date:   Mon Apr 24 12:40:30 2006 -0700

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

diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c
index f4b928d..046a4d1 100644
--- a/src/cairo-pdf-surface.c
+++ b/src/cairo-pdf-surface.c
@@ -425,7 +425,7 @@ cairo_pdf_surface_set_dpi (cairo_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;
     }
diff --git a/src/cairo-ps-surface.c b/src/cairo-ps-surface.c
index 1d73495..33aa663 100644
--- a/src/cairo-ps-surface.c
+++ b/src/cairo-ps-surface.c
@@ -670,7 +670,7 @@ cairo_ps_surface_set_dpi (cairo_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;
     }


More information about the cairo-commit mailing list