| Index: core/src/fpdfdoc/doc_link.cpp
|
| diff --git a/core/src/fpdfdoc/doc_link.cpp b/core/src/fpdfdoc/doc_link.cpp
|
| index e7b6be5ca4445bd77650da9dda60c7e3aab6d5f9..b7c640af5ebc92589a38444a87d4c6aecb836ada 100644
|
| --- a/core/src/fpdfdoc/doc_link.cpp
|
| +++ b/core/src/fpdfdoc/doc_link.cpp
|
| @@ -90,16 +90,17 @@ CPDF_Dest CPDF_Link::GetDest(CPDF_Document* pDoc)
|
| {
|
| CPDF_Object* pDest = m_pDict->GetElementValue("Dest");
|
| if (pDest == NULL) {
|
| - return NULL;
|
| + return CPDF_Dest();
|
| }
|
| if (pDest->GetType() == PDFOBJ_STRING || pDest->GetType() == PDFOBJ_NAME) {
|
| CPDF_NameTree name_tree(pDoc, FX_BSTRC("Dests"));
|
| CFX_ByteStringC name = pDest->GetString();
|
| - return name_tree.LookupNamedDest(pDoc, name);
|
| - } else if (pDest->GetType() == PDFOBJ_ARRAY) {
|
| - return (CPDF_Array*)pDest;
|
| + return CPDF_Dest(name_tree.LookupNamedDest(pDoc, name));
|
| }
|
| - return NULL;
|
| + if (pDest->GetType() == PDFOBJ_ARRAY) {
|
| + return CPDF_Dest((CPDF_Array*)pDest);
|
| + }
|
| + return CPDF_Dest();
|
| }
|
| CPDF_Action CPDF_Link::GetAction()
|
| {
|
|
|