From 5a5e16ca34aeb8a8ecbb9223413c0340b09de224 Mon Sep 17 00:00:00 2001 From: infirit Date: Tue, 9 Dec 2014 12:45:18 +0100 Subject: [libdocument] Use find_link_page() instead of find_link_dest() in get_dest_page() Since we only need the page, not the whole destination Taken from evince commit: bb10c2aa8216b1a336e58a5177229a86c4e586ae From: Carlos Garcia Campos --- libdocument/ev-document-links.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'libdocument') diff --git a/libdocument/ev-document-links.c b/libdocument/ev-document-links.c index bd4afb01..42ffc59a 100644 --- a/libdocument/ev-document-links.c +++ b/libdocument/ev-document-links.c @@ -100,14 +100,8 @@ ev_document_links_get_dest_page (EvDocumentLinks *document_links, switch (ev_link_dest_get_dest_type (dest)) { case EV_LINK_DEST_TYPE_NAMED: { - EvLinkDest *dest2; - - dest2 = ev_document_links_find_link_dest (document_links, - ev_link_dest_get_named_dest (dest)); - if (dest2) { - page = ev_link_dest_get_page (dest2); - g_object_unref (dest2); - } + page = ev_document_links_find_link_page (document_links, + ev_link_dest_get_named_dest (dest)); } break; case EV_LINK_DEST_TYPE_PAGE_LABEL: -- cgit v1.2.1