diff options
Diffstat (limited to 'core/src/fpdfdoc/doc_link.cpp')
-rw-r--r-- | core/src/fpdfdoc/doc_link.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/core/src/fpdfdoc/doc_link.cpp b/core/src/fpdfdoc/doc_link.cpp index 977efeafd1..6d3f6c5046 100644 --- a/core/src/fpdfdoc/doc_link.cpp +++ b/core/src/fpdfdoc/doc_link.cpp @@ -81,9 +81,8 @@ CPDF_Dest CPDF_Link::GetDest(CPDF_Document* pDoc) { CFX_ByteStringC name = pDest->GetString(); return CPDF_Dest(name_tree.LookupNamedDest(pDoc, name)); } - if (pDest->GetType() == PDFOBJ_ARRAY) { - return CPDF_Dest((CPDF_Array*)pDest); - } + if (CPDF_Array* pArray = pDest->AsArray()) + return CPDF_Dest(pArray); return CPDF_Dest(); } CPDF_Action CPDF_Link::GetAction() { |