Index: core/src/fpdfapi/fpdf_font/fpdf_font.cpp |
diff --git a/core/src/fpdfapi/fpdf_font/fpdf_font.cpp b/core/src/fpdfapi/fpdf_font/fpdf_font.cpp |
index 7a57889a35f4d51411a2d106a8cfe3e2242aa523..10ca3113e3e5c9fb53b170f1a8b650d3d3b6052e 100644 |
--- a/core/src/fpdfapi/fpdf_font/fpdf_font.cpp |
+++ b/core/src/fpdfapi/fpdf_font/fpdf_font.cpp |
@@ -746,10 +746,11 @@ void CPDF_Font::LoadPDFEncoding(CPDF_Object* pEncoding, |
GetPredefinedEncoding(iBaseEncoding, bsEncoding); |
return; |
} |
- if (pEncoding->GetType() != PDFOBJ_DICTIONARY) { |
+ |
+ CPDF_Dictionary* pDict = pEncoding->AsDictionary(); |
+ if (!pDict) |
return; |
- } |
- CPDF_Dictionary* pDict = (CPDF_Dictionary*)pEncoding; |
+ |
if (iBaseEncoding != PDFFONT_ENCODING_ADOBE_SYMBOL && |
iBaseEncoding != PDFFONT_ENCODING_ZAPFDINGBATS) { |
CFX_ByteString bsEncoding = pDict->GetString(FX_BSTRC("BaseEncoding")); |
@@ -782,6 +783,7 @@ void CPDF_Font::LoadPDFEncoding(CPDF_Object* pEncoding, |
} |
} |
} |
+ |
FX_BOOL CPDF_Font::IsStandardFont() const { |
if (m_FontType != PDFFONT_TYPE1) |
return FALSE; |