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;