diff options
author | Tor Andersson <tor@ccxvii.net> | 2012-02-06 13:25:57 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2012-02-06 13:32:01 +0100 |
commit | 2c700c95c42671ef124ca85bf616115ae9f99259 (patch) | |
tree | d426ca194a181040334b8c775c597d2d6fca46a8 | |
parent | 657a66bf1c5e8c769d3262078a5609ebd433c0dd (diff) | |
download | mupdf-2c700c95c42671ef124ca85bf616115ae9f99259.tar.xz |
Drop XPS links in the correct function.
Prevents segfaults when revisiting pages and trying to
access the link object that was freed too early.
-rw-r--r-- | xps/xps_doc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xps/xps_doc.c b/xps/xps_doc.c index 340cd700..d8ab7bf4 100644 --- a/xps/xps_doc.c +++ b/xps/xps_doc.c @@ -225,6 +225,7 @@ xps_free_fixed_pages(xps_document *doc) { xps_page *next = page->next; xps_free_page(doc, page); + fz_drop_link(doc->ctx, page->links); fz_free(doc->ctx, page->name); fz_free(doc->ctx, page); page = next; @@ -463,6 +464,5 @@ 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_drop_link(doc->ctx, page->links); page->root = NULL; } |