diff options
author | Robin Watts <robin.watts@artifex.com> | 2013-06-13 16:00:35 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2013-06-13 16:37:06 +0100 |
commit | f85653219a85a9f91cb14471485611ca5f6b25ba (patch) | |
tree | d0abcf8b18b90f1430d4dddf4d4ae2e9d3deb07e /pdf | |
parent | 181dca77f819f9953e0eed4b10ee83d0a9153212 (diff) | |
download | mupdf-f85653219a85a9f91cb14471485611ca5f6b25ba.tar.xz |
Make display lists reference counted objects.
Remove fz_free_display_list from the API; instead use fz_drop_display_list.
Diffstat (limited to 'pdf')
-rw-r--r-- | pdf/pdf_annot.c | 4 | ||||
-rw-r--r-- | pdf/pdf_page.c | 2 |
2 files changed, 4 insertions, 2 deletions
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) |