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

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: fix if check warning 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
« no previous file with comments | « core/src/fxcrt/fx_xml_parser.cpp ('k') | fpdfsdk/src/fpdf_ext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..8e10cc22e3c9386382d8134b12e0d9fb593bbbfc 100644
--- a/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp
+++ b/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp
@@ -239,14 +239,16 @@ 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();
+ pObj = FPDF_GetFieldAttr(pAcroFormDict, "DA");
+ sDA = pObj ? pObj->GetString() : CFX_ByteString();
}
}
« no previous file with comments | « core/src/fxcrt/fx_xml_parser.cpp ('k') | fpdfsdk/src/fpdf_ext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698