summaryrefslogtreecommitdiff
path: root/core/src/fpdfdoc/doc_formfield.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/fpdfdoc/doc_formfield.cpp')
-rw-r--r--core/src/fpdfdoc/doc_formfield.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/core/src/fpdfdoc/doc_formfield.cpp b/core/src/fpdfdoc/doc_formfield.cpp
index e51acf94a1..eeba372390 100644
--- a/core/src/fpdfdoc/doc_formfield.cpp
+++ b/core/src/fpdfdoc/doc_formfield.cpp
@@ -1077,9 +1077,12 @@ FX_BOOL CPDF_FormField::ClearSelectedOptions(FX_BOOL bNotify)
}
void CPDF_FormField::LoadDA()
{
- CFX_ByteString DA = FPDF_GetFieldAttr(m_pDict, "DA") ? FPDF_GetFieldAttr(m_pDict, "DA")->GetString() : CFX_ByteString();
- if (DA.IsEmpty()) {
- DA = m_pForm->m_pFormDict ? m_pForm->m_pFormDict->GetString("DA") : CFX_ByteString();
+ CFX_ByteString DA;
+ if (CPDF_Object* pObj_t = FPDF_GetFieldAttr(m_pDict, "DA")) {
+ DA = pObj_t->GetString();
+ }
+ if (DA.IsEmpty() && m_pForm->m_pFormDict) {
+ DA = m_pForm->m_pFormDict->GetString("DA");
}
if (DA.IsEmpty()) {
return;