summaryrefslogtreecommitdiff
path: root/source/pdf/pdf-annot-edit.c
diff options
context:
space:
mode:
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);
}