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

Unified Diff: fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp

Issue 361553002: Remove "this==NULL" and adjust corresponding callers (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: change tab to spaces Created 6 years, 6 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
Index: fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp
diff --git a/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp b/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp
index 0c7cd4855354f00f4e818a4ff326f2e78e3b9c78..8de5d6d093e2dac5c3798b9cbb1fe234bf95cff2 100644
--- a/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp
+++ b/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp
@@ -239,16 +239,12 @@ CPDF_Font* CBA_FontMap::GetAnnotDefaultFont(CFX_ByteString &sAlias)
}
CFX_ByteString sDA;
-
- sDA = FPDF_GetFieldAttr(m_pAnnotDict, "DA")->GetString();
+ CPDF_Object* pObj;
+ if ( pObj = FPDF_GetFieldAttr(m_pAnnotDict, "DA"))
+ sDA = pObj->GetString();
- if (bWidget)
- {
- if (sDA.IsEmpty())
- {
- sDA = FPDF_GetFieldAttr(pAcroFormDict, "DA")->GetString();
- }
- }
+ if (bWidget && sDA.IsEmpty() && (pObj = FPDF_GetFieldAttr(pAcroFormDict, "DA")))
Nico 2014/06/28 01:01:07 I don't know if it matters, but this changes behav
Bo Xu 2014/06/28 01:52:30 You are right, this should be adjusted. On 2014/0
+ sDA = pObj->GetString();
CPDF_Dictionary * pFontDict = NULL;

Powered by Google App Engine
This is Rietveld 408576698