summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp
diff options
context:
space:
mode:
authorBo Xu <bo_xu@foxitsoftware.com>2014-06-30 09:49:21 -0700
committerBo Xu <bo_xu@foxitsoftware.com>2014-06-30 09:49:21 -0700
commit287e11a213d3197ac3e321acf294d903b271c269 (patch)
tree28f6f9dd00331c2748d73f96d818ce04a9775e8d /fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp
parentad30f609702d232f1708a0792d682c3cfaa0e235 (diff)
downloadpdfium-287e11a213d3197ac3e321acf294d903b271c269.tar.xz
Remove "this==NULL" and adjust corresponding callers
BUG= R=thakis@chromium.org Review URL: https://codereview.chromium.org/361553002
Diffstat (limited to 'fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp')
-rw-r--r--fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp b/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp
index 0c7cd48553..8e10cc22e3 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();
}
}