summaryrefslogtreecommitdiff
path: root/source/pdf/pdf-xref.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/pdf/pdf-xref.c')
-rw-r--r--source/pdf/pdf-xref.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/pdf/pdf-xref.c b/source/pdf/pdf-xref.c
index 0cf20d4c..a7dc3514 100644
--- a/source/pdf/pdf-xref.c
+++ b/source/pdf/pdf-xref.c
@@ -2768,7 +2768,10 @@ pdf_add_stream(fz_context *ctx, pdf_document *doc, fz_buffer *buf)
fz_try(ctx)
pdf_update_stream(ctx, doc, ind, buf, 0);
fz_catch(ctx)
+ {
pdf_drop_obj(ctx, ind);
+ fz_rethrow(ctx);
+ }
return ind;
}