diff options
author | Bo Xu <bo_xu@foxitsoftware.com> | 2014-07-21 10:02:07 -0700 |
---|---|---|
committer | Bo Xu <bo_xu@foxitsoftware.com> | 2014-07-21 10:02:07 -0700 |
commit | 22b31e0b3d14a50c4dd70ed22e0f24975dc1137c (patch) | |
tree | 70be27446d563f5508eb3a716ce52264d92223cf /core/src/fpdfdoc/doc_ap.cpp | |
parent | baca77096e21acb07fa0b6e3a9ca7b926d18dcf1 (diff) | |
download | pdfium-22b31e0b3d14a50c4dd70ed22e0f24975dc1137c.tar.xz |
Adjust null object checkchromium/2103chromium/2102
BUG=None
R=thakis@chromium.org
Review URL: https://codereview.chromium.org/396173003
Diffstat (limited to 'core/src/fpdfdoc/doc_ap.cpp')
-rw-r--r-- | core/src/fpdfdoc/doc_ap.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/src/fpdfdoc/doc_ap.cpp b/core/src/fpdfdoc/doc_ap.cpp index 6a8ab374d2..0e2a75ad2c 100644 --- a/core/src/fpdfdoc/doc_ap.cpp +++ b/core/src/fpdfdoc/doc_ap.cpp @@ -253,7 +253,10 @@ static FX_BOOL GenerateWidgetAP(CPDF_Document* pDoc, CPDF_Dictionary* pAnnotDict if (!pFormDict) { return FALSE; } - CFX_ByteString DA = FPDF_GetFieldAttr(pAnnotDict, "DA") ? FPDF_GetFieldAttr(pAnnotDict, "DA")->GetString() : CFX_ByteString(); + CFX_ByteString DA; + if (CPDF_Object* pDAObj = FPDF_GetFieldAttr(pAnnotDict, "DA")) { + DA = pDAObj->GetString(); + } if (DA.IsEmpty()) { DA = pFormDict->GetString("DA"); } |