diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2012-02-03 15:14:13 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2012-02-03 15:14:13 +0100 |
commit | 27cc2be0735b9ff115a9565b905f3b46f26e9ec8 (patch) | |
tree | c405c62bee5d3f7e618d567e95ee6a83ed53220e /xps | |
parent | 70efb11990b0947e04d0051db8a813b9a0a0e4a4 (diff) | |
download | mupdf-27cc2be0735b9ff115a9565b905f3b46f26e9ec8.tar.xz |
Reference count fz_link objects.
Diffstat (limited to 'xps')
-rw-r--r-- | xps/muxps.h | 1 | ||||
-rw-r--r-- | xps/xps_doc.c | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/xps/muxps.h b/xps/muxps.h index 6a6f345f..6037a64e 100644 --- a/xps/muxps.h +++ b/xps/muxps.h @@ -108,6 +108,7 @@ void xps_free_page_list(xps_document *doc); int xps_count_pages(xps_document *doc); xps_page *xps_load_page(xps_document *doc, int number); +fz_link *xps_load_links(xps_document *doc, xps_page *page); fz_rect xps_bound_page(xps_document *doc, xps_page *page); void xps_free_page(xps_document *doc, xps_page *page); diff --git a/xps/xps_doc.c b/xps/xps_doc.c index 3a4738dd..340cd700 100644 --- a/xps/xps_doc.c +++ b/xps/xps_doc.c @@ -146,7 +146,7 @@ xps_load_links(xps_document *doc, xps_page *page) { if (!page->links_resolved) fz_warn(doc->ctx, "xps_load_links before page has been executed!"); - return page->links; + return fz_keep_link(doc->ctx, page->links); } static void @@ -463,6 +463,6 @@ xps_free_page(xps_document *doc, xps_page *page) /* only free the XML contents */ if (page->root) xml_free_element(doc->ctx, page->root); - fz_free_link(doc->ctx, page->links); + fz_drop_link(doc->ctx, page->links); page->root = NULL; } |