]> www.fi.muni.cz Git - evince.git/blobdiff - pdf/ev-poppler.cc
Fix some bugs with xyz links, respect zoom
[evince.git] / pdf / ev-poppler.cc
index 769c78a7a1f684973f1e3eaf0b1a742344e158f5..414bfb453fcd350a49613755bb8393763de413c3 100644 (file)
@@ -705,7 +705,7 @@ pdf_document_links_has_document_links (EvDocumentLinks *document_links)
 static EvLink *
 ev_link_from_dest (PopplerAction *action)
 {
-       EvLink *link;
+       EvLink *link = NULL;
        const char *unimplemented_dest = NULL;
 
        switch (action->goto_dest.dest->type) {
@@ -747,7 +747,9 @@ ev_link_from_dest (PopplerAction *action)
                           unimplemented_dest);
        }
 
-       link = ev_link_new_page (action->any.title, action->goto_dest.dest->page_num - 1);
+       if (link == NULL) {
+               link = ev_link_new_page (action->any.title, action->goto_dest.dest->page_num - 1);
+       }
 
        return link;
 }