From c28c33a5888bc1ec4ce2067a7215b7f74d4323d1 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Thu, 7 Sep 2006 16:42:04 -0700 Subject: [PATCH] Check status value of output_stream object at time of destroy --- src/cairo-ps-surface.c | 2 ++ src/cairo-type1-fallback.c | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/cairo-ps-surface.c b/src/cairo-ps-surface.c index 994d92233..7403b0ec0 100644 --- a/src/cairo-ps-surface.c +++ b/src/cairo-ps-surface.c @@ -313,6 +313,8 @@ _cairo_ps_surface_emit_path (cairo_ps_surface_t *surface, _cairo_ps_surface_path_close_path, &path_info); + if (status == CAIRO_STATUS_SUCCESS) + status = _cairo_output_stream_get_status (word_wrap); _cairo_output_stream_destroy (word_wrap); return status; diff --git a/src/cairo-type1-fallback.c b/src/cairo-type1-fallback.c index 04337e35b..6c859d43c 100644 --- a/src/cairo-type1-fallback.c +++ b/src/cairo-type1-fallback.c @@ -526,7 +526,9 @@ cairo_type1_font_write_private_dict (cairo_type1_font_t *font, "dup /FontName get exch definefont pop\n" "mark currentfile closefile\n"); -fail: + if (font->status == CAIRO_STATUS_SUCCESS) + font->status = _cairo_output_stream_get_status (encrypted_output); + fail: _cairo_output_stream_destroy (encrypted_output); return font->status;