From f85653219a85a9f91cb14471485611ca5f6b25ba Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Thu, 13 Jun 2013 16:00:35 +0100 Subject: Make display lists reference counted objects. Remove fz_free_display_list from the API; instead use fz_drop_display_list. --- pdf/pdf_annot.c | 4 ++-- pdf/pdf_page.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'pdf') diff --git a/pdf/pdf_annot.c b/pdf/pdf_annot.c index 4407616a..ad89725b 100644 --- a/pdf/pdf_annot.c +++ b/pdf/pdf_annot.c @@ -1086,7 +1086,7 @@ pdf_set_markup_obj_appearance(pdf_document *doc, pdf_obj *annot, float color[3], fz_free_device(dev); fz_drop_stroke_state(ctx, stroke); fz_free_path(ctx, path); - fz_free_display_list(ctx, strike_list); + fz_drop_display_list(ctx, strike_list); } fz_catch(ctx) { @@ -1178,7 +1178,7 @@ pdf_set_ink_obj_appearance(pdf_document *doc, pdf_obj *annot) fz_free_device(dev); fz_drop_stroke_state(ctx, stroke); fz_free_path(ctx, path); - fz_free_display_list(ctx, strike_list); + fz_drop_display_list(ctx, strike_list); } fz_catch(ctx) { diff --git a/pdf/pdf_page.c b/pdf/pdf_page.c index 99776f42..c86cc6ee 100644 --- a/pdf/pdf_page.c +++ b/pdf/pdf_page.c @@ -468,6 +468,8 @@ pdf_load_links(pdf_document *xref, pdf_page *page) void pdf_free_page(pdf_document *xref, pdf_page *page) { + if (page == NULL) + return; pdf_drop_obj(page->resources); pdf_drop_obj(page->contents); if (page->links) -- cgit v1.2.3