Index: fpdfsdk/src/fpdfview.cpp |
diff --git a/fpdfsdk/src/fpdfview.cpp b/fpdfsdk/src/fpdfview.cpp |
index 19faea5cc950c74f918fde21d535909841cd2267..0d6dcf29f18e0c4041f78b7ad2f0893debad0267 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 (pDestObj->GetType() == PDFOBJ_DICTIONARY) { |
- pDestObj = ((CPDF_Dictionary*)pDestObj)->GetArray(FX_BSTRC("D")); |
+ if (CPDF_Dictionary* pDict = pDestObj->AsDictionary()) { |
+ pDestObj = pDict->GetArray(FX_BSTRC("D")); |
if (!pDestObj) |
return NULL; |
} |