summaryrefslogtreecommitdiff
path: root/source/pdf/pdf-annot-edit.c
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2016-04-12 11:22:00 +0100
committerRobin Watts <robin.watts@artifex.com>2016-04-12 11:51:55 +0100
commitc702080ae741f08d04788fd415b2a870c6e269e7 (patch)
treeb151e65d68823601be65ab6c59f61fb64a61726b /source/pdf/pdf-annot-edit.c
parent80e4786f5a0673c37821ba373e78c4fb58274314 (diff)
downloadmupdf-c702080ae741f08d04788fd415b2a870c6e269e7.tar.xz
Fix PDF annotations not appearing after creation.
Caused by a mismatch in the annotation creation/loading code.
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 66704a2f..c8594be1 100644
--- a/source/pdf/pdf-annot-edit.c
+++ b/source/pdf/pdf-annot-edit.c
@@ -117,8 +117,7 @@ pdf_create_annot(fz_context *ctx, pdf_document *doc, pdf_page *page, fz_annot_ty
/* Make printable as default */
pdf_dict_put_drop(ctx, annot_obj, PDF_NAME_F, pdf_new_int(ctx, doc, F_Print));
- annot = fz_malloc_struct(ctx, pdf_annot);
- annot->page = page;
+ annot = pdf_new_annot(ctx, page);
annot->rect = rect;
annot->pagerect = rect;
annot->ap = NULL;