Chromium Code Reviews| Index: core/src/fpdfdoc/doc_ap.cpp |
| diff --git a/core/src/fpdfdoc/doc_ap.cpp b/core/src/fpdfdoc/doc_ap.cpp |
| index 6a8ab374d21e7150339d2f4258977eef8b25c6d6..730fd04b14504e2461ce9ae7db38dff7bae72028 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")){ |
|
Nico
2014/07/21 16:48:12
nit: add a space between )) and {
Bo Xu
2014/07/21 17:01:29
Done.
|
| + DA = pDAObj->GetString(); |
| + } |
| if (DA.IsEmpty()) { |
| DA = pFormDict->GetString("DA"); |
| } |