Index: fpdfsdk/src/fpdfview.cpp |
diff --git a/fpdfsdk/src/fpdfview.cpp b/fpdfsdk/src/fpdfview.cpp |
index cfc2f0db04f9bee983524b104d0ded317831766c..c2157e96bd5e20c48ada34302cddcf2b0fdc8e8e 100644 |
--- a/fpdfsdk/src/fpdfview.cpp |
+++ b/fpdfsdk/src/fpdfview.cpp |
@@ -1051,8 +1051,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; |
} |