Chromium Code Reviews| Index: core/src/fpdfdoc/doc_formfield.cpp |
| diff --git a/core/src/fpdfdoc/doc_formfield.cpp b/core/src/fpdfdoc/doc_formfield.cpp |
| index 7f85aff4d39a8b7bbdf8803d9edcc6d9b9da2bb3..3b6980bcb86ede561cba2fde7af17797fe040b71 100644 |
| --- a/core/src/fpdfdoc/doc_formfield.cpp |
| +++ b/core/src/fpdfdoc/doc_formfield.cpp |
| @@ -235,13 +235,13 @@ int CPDF_FormField::GetFieldType() { |
| } |
| return FIELDTYPE_UNKNOWN; |
| } |
| + |
| CPDF_AAction CPDF_FormField::GetAdditionalAction() { |
| CPDF_Object* pObj = FPDF_GetFieldAttr(m_pDict, "AA"); |
| - if (!pObj) { |
| - return NULL; |
| - } |
| - return pObj->GetDict(); |
| + CPDF_Dictionary* dict = pObj ? pObj->GetDict() : nullptr; |
| + return CPDF_AAction(dict); |
|
Tom Sepez
2016/03/01 17:53:35
Nit: local |dict| only used once, so combine with
Wei Li
2016/03/01 21:46:53
Done.
|
| } |
| + |
| CFX_WideString CPDF_FormField::GetAlternateName() { |
| CPDF_Object* pObj = FPDF_GetFieldAttr(m_pDict, "TU"); |
| if (!pObj) { |