summaryrefslogtreecommitdiff
path: root/source/pdf/pdf-annot-edit.c
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2018-03-20 16:12:26 +0100
committerTor Andersson <tor.andersson@artifex.com>2018-03-22 14:58:18 +0100
commit6d433a5702bda01f17407be6c272eae8653d1800 (patch)
tree0ae255a1488b2da1f729b256f33845f4ddd4b5c9 /source/pdf/pdf-annot-edit.c
parent8d6283fd202e650e80470a544442d384d10a0b7e (diff)
downloadmupdf-6d433a5702bda01f17407be6c272eae8653d1800.tar.xz
Use pdf_dict_put_dict family of functions.
Diffstat (limited to 'source/pdf/pdf-annot-edit.c')
-rw-r--r--source/pdf/pdf-annot-edit.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/source/pdf/pdf-annot-edit.c b/source/pdf/pdf-annot-edit.c
index 7708f9d7..8ca64198 100644
--- a/source/pdf/pdf-annot-edit.c
+++ b/source/pdf/pdf-annot-edit.c
@@ -496,10 +496,9 @@ pdf_annot_border(fz_context *ctx, pdf_annot *annot)
void
pdf_set_annot_border(fz_context *ctx, pdf_annot *annot, float w)
{
- pdf_document *doc = annot->page->doc;
pdf_obj *bs = pdf_dict_get(ctx, annot->obj, PDF_NAME_BS);
if (!pdf_is_dict(ctx, bs))
- pdf_dict_put_drop(ctx, annot->obj, PDF_NAME_BS, bs = pdf_new_dict(ctx, doc, 1));
+ bs = pdf_dict_put_dict(ctx, annot->obj, PDF_NAME_BS, 1);
pdf_dict_put_real(ctx, bs, PDF_NAME_W, w);
pdf_dirty_annot(ctx, annot);
}