From c702080ae741f08d04788fd415b2a870c6e269e7 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Tue, 12 Apr 2016 11:22:00 +0100 Subject: Fix PDF annotations not appearing after creation. Caused by a mismatch in the annotation creation/loading code. --- source/pdf/pdf-annot-edit.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source/pdf/pdf-annot-edit.c') 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; -- cgit v1.2.3