summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fpdfview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/src/fpdfview.cpp')
-rw-r--r--fpdfsdk/src/fpdfview.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/fpdfsdk/src/fpdfview.cpp b/fpdfsdk/src/fpdfview.cpp
index 0d6dcf29f1..19faea5cc9 100644
--- a/fpdfsdk/src/fpdfview.cpp
+++ b/fpdfsdk/src/fpdfview.cpp
@@ -882,8 +882,8 @@ DLLEXPORT FPDF_DEST STDCALL FPDF_GetNamedDest(FPDF_DOCUMENT document,
}
if (!pDestObj)
return NULL;
- if (CPDF_Dictionary* pDict = pDestObj->AsDictionary()) {
- pDestObj = pDict->GetArray(FX_BSTRC("D"));
+ if (pDestObj->GetType() == PDFOBJ_DICTIONARY) {
+ pDestObj = ((CPDF_Dictionary*)pDestObj)->GetArray(FX_BSTRC("D"));
if (!pDestObj)
return NULL;
}