diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2017-10-17 16:41:59 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2017-11-01 13:08:56 +0100 |
commit | 1dc763159b03cbd4387713f353f26c890d2c0e52 (patch) | |
tree | d43c18deeacd70e23d7e353c8f0c074c87419a34 /source/fitz/output-svg.c | |
parent | f595e889b91a674eb94db7ca4d832da54f5194cd (diff) | |
download | mupdf-1dc763159b03cbd4387713f353f26c890d2c0e52.tar.xz |
Add separate fz_close_output step.
Closing flushes output and may throw exceptions.
Dropping frees the state and never throws exceptions.
Diffstat (limited to 'source/fitz/output-svg.c')
-rw-r--r-- | source/fitz/output-svg.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/source/fitz/output-svg.c b/source/fitz/output-svg.c index 7bae9d4f..8895960a 100644 --- a/source/fitz/output-svg.c +++ b/source/fitz/output-svg.c @@ -46,14 +46,18 @@ svg_end_page(fz_context *ctx, fz_document_writer *wri_, fz_device *dev) fz_svg_writer *wri = (fz_svg_writer*)wri_; fz_try(ctx) + { fz_close_device(ctx, dev); + fz_close_output(ctx, wri->out); + } fz_always(ctx) + { fz_drop_device(ctx, dev); + fz_drop_output(ctx, wri->out); + wri->out = NULL; + } fz_catch(ctx) fz_rethrow(ctx); - - fz_drop_output(ctx, wri->out); - wri->out = NULL; } static void |