diff --git a/gb.pdf/src/CPdfDocument.cpp b/gb.pdf/src/CPdfDocument.cpp index 4b53fd50d..58a51aecf 100644 --- a/gb.pdf/src/CPdfDocument.cpp +++ b/gb.pdf/src/CPdfDocument.cpp @@ -256,7 +256,7 @@ static uint32_t aux_get_page_from_action(void *_object, const_LinkAction *act) name = ((LinkGoTo*)act)->getNamedDest(); if (name) { #if POPPLER_VERSION_0_64 - dest = THIS->doc->findDest(name); + dest = THIS->doc->findDest(name).get(); #else dest = THIS->doc->findDest((GooString *) name); #endif @@ -307,6 +307,7 @@ static char* aux_get_target_from_action(const_LinkAction *act) char *vl=NULL; char *uni=NULL; const_GooString *tmp=NULL; + GooString gstr; switch (act->getKind()) { @@ -317,13 +318,13 @@ static char* aux_get_target_from_action(const_LinkAction *act) tmp=((LinkLaunch*)act)->getFileName(); break; case actionURI: - tmp=((LinkURI*)act)->getURI(); break; + gstr=GooString(((LinkURI*)act)->getURI()); tmp=&gstr; break; case actionNamed: - tmp=((LinkNamed*)act)->getName(); break; + gstr=GooString(((LinkNamed*)act)->getName()); tmp=&gstr; break; case actionMovie: - tmp=((LinkMovie*)act)->getAnnotTitle(); break; + gstr=GooString(((LinkMovie*)act)->getAnnotTitle()); tmp=&gstr; break; default: break;