Index: core/src/fpdfdoc/doc_formfield.cpp |
diff --git a/core/src/fpdfdoc/doc_formfield.cpp b/core/src/fpdfdoc/doc_formfield.cpp |
index e51acf94a111a5216045773ba04e45fe918db420..fce16d8aa6e7579cd3360d1dcbe5d59362fb5041 100644 |
--- a/core/src/fpdfdoc/doc_formfield.cpp |
+++ b/core/src/fpdfdoc/doc_formfield.cpp |
@@ -1077,9 +1077,13 @@ 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(); |
+ if (!m_pForm->m_pFormDict) { |
+ return; |
+ } |
+ CFX_ByteString DA; |
+ CPDF_Object* pObj_t = FPDF_GetFieldAttr(m_pDict, "DA"); |
+ if (pObj_t) { |
Nico
2014/07/21 05:07:53
You can write
if (CPDF_Object* pObj_t = FPDF_Ge
|
+ DA = pObj_t->GetString(); |
} |
Nico
2014/07/21 05:07:53
This is different from the previous code as far as
Bo Xu
2014/07/21 16:40:44
Done.
|
if (DA.IsEmpty()) { |
return; |