Index: core/fpdfdoc/cpvt_fontmap.cpp |
diff --git a/core/fpdfdoc/cpvt_fontmap.cpp b/core/fpdfdoc/cpvt_fontmap.cpp |
index 7eff694d81e98b3c393d1a6473c310978afdfd86..eb209664fdce0e453a903b619b435c8edf8ae5f5 100644 |
--- a/core/fpdfdoc/cpvt_fontmap.cpp |
+++ b/core/fpdfdoc/cpvt_fontmap.cpp |
@@ -37,9 +37,10 @@ void CPVT_FontMap::GetAnnotSysPDFFont(CPDF_Document* pDoc, |
if (!pPDFFont) |
return; |
- if (CPDF_Dictionary* pFontList = pResDict->GetDictFor("Font")) { |
- if (!pFontList->KeyExist(sSysFontAlias)) |
- pFontList->SetReferenceFor(sSysFontAlias, pDoc, pPDFFont->GetFontDict()); |
+ CPDF_Dictionary* pFontList = pResDict->GetDictFor("Font"); |
+ if (pFontList && !pFontList->KeyExist(sSysFontAlias)) { |
+ pFontList->SetReferenceFor(sSysFontAlias, pDoc, |
+ pPDFFont->GetFontDict()->GetObjNum()); |
} |
pSysFont = pPDFFont; |
} |