summaryrefslogtreecommitdiff
path: root/xps
diff options
context:
space:
mode:
Diffstat (limited to 'xps')
-rw-r--r--xps/muxps.h1
-rw-r--r--xps/xps_doc.c4
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;
}