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

Adrian Johnson ajohnson at kemper.freedesktop.org
Thu Sep 11 01:56:45 PDT 2008


 src/cairo-pdf-surface.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 15dd80c89437f0ef2f2458e3d115778ac161b500
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Thu Sep 11 18:26:04 2008 +0930

    Don't overwrite previous status

diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c
index 96e4479..6ca8d9a 100644
--- a/src/cairo-pdf-surface.c
+++ b/src/cairo-pdf-surface.c
@@ -3486,6 +3486,7 @@ _cairo_pdf_surface_analyze_user_font_subset (cairo_scaled_font_subset_t *font_su
 {
     cairo_pdf_surface_t *surface = closure;
     cairo_status_t status = CAIRO_STATUS_SUCCESS;
+    cairo_status_t status2;
     unsigned int i;
     cairo_surface_t *type3_surface;
     cairo_output_stream_t *null_stream;
@@ -3505,10 +3506,13 @@ _cairo_pdf_surface_analyze_user_font_subset (cairo_scaled_font_subset_t *font_su
 	if (status)
 	    break;
     }
+
     cairo_surface_destroy (type3_surface);
-    status = _cairo_output_stream_destroy (null_stream);
+    status2 = _cairo_output_stream_destroy (null_stream);
+    if (status == CAIRO_STATUS_SUCCESS)
+	status = status2;
 
-    return status;
+    return status2;
 }
 
 static cairo_status_t


More information about the cairo-commit mailing list