From ae9780583c18c949bf975131a24eb8b8361ddbf6 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 4 May 2016 21:45:41 +0200 Subject: murun: Add document writer object. --- source/pdf/pdf-write.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/pdf/pdf-write.c') diff --git a/source/pdf/pdf-write.c b/source/pdf/pdf-write.c index 5154f818..ade277ce 100644 --- a/source/pdf/pdf-write.c +++ b/source/pdf/pdf-write.c @@ -3136,12 +3136,13 @@ pdf_writer_end_page(fz_context *ctx, fz_document_writer *wri_, fz_device *dev) fz_try(ctx) { - fz_drop_device(ctx, dev); + fz_close_device(ctx, dev); obj = pdf_add_page(ctx, wri->pdf, &wri->mediabox, 0, wri->resources, wri->contents); pdf_insert_page(ctx, wri->pdf, -1, obj); } fz_always(ctx) { + fz_drop_device(ctx, dev); pdf_drop_obj(ctx, obj); fz_drop_buffer(ctx, wri->contents); wri->contents = NULL; -- cgit v1.2.3