Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1229)

Unified Diff: core/fpdfdoc/cpvt_fontmap.cpp

Issue 2361713002: Remove some objnum locals with AddIndirectObject (Closed)
Patch Set: Same treatment for arrays Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fpdfdoc/cpdf_interform.cpp ('k') | core/fpdfdoc/cpvt_generateap.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « core/fpdfdoc/cpdf_interform.cpp ('k') | core/fpdfdoc/cpvt_generateap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698