diff options
-rw-r--r-- | utils/HtmlOutputDev.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/utils/HtmlOutputDev.cc b/utils/HtmlOutputDev.cc index 0212626b..5be687ab 100644 --- a/utils/HtmlOutputDev.cc +++ b/utils/HtmlOutputDev.cc @@ -1546,7 +1546,6 @@ GooString* HtmlOutputDev::getLinkDest(AnnotLink *link){ { case actionGoTo: { - GooString* file = new GooString(gbasename(Docname->c_str())); int destPage=1; LinkGoTo *ha=(LinkGoTo *)link->getAction(); std::unique_ptr<LinkDest> dest; @@ -1556,6 +1555,8 @@ GooString* HtmlOutputDev::getLinkDest(AnnotLink *link){ dest=catalog->findDest(ha->getNamedDest()); if (dest){ + GooString* file = new GooString(gbasename(Docname->c_str())); + if (dest->isPageRef()){ const Ref pageref=dest->getPageRef(); destPage=catalog->findPage(pageref); |