summaryrefslogtreecommitdiff
path: root/core/fpdfdoc/cpvt_fontmap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfdoc/cpvt_fontmap.cpp')
-rw-r--r--core/fpdfdoc/cpvt_fontmap.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/core/fpdfdoc/cpvt_fontmap.cpp b/core/fpdfdoc/cpvt_fontmap.cpp
index 7eff694d81..eb209664fd 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;
}