Chromium Code Reviews| Index: fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp |
| diff --git a/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp b/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp |
| index 0c7cd4855354f00f4e818a4ff326f2e78e3b9c78..c9392debf1d011796e626bd99d097978e4a7fd78 100644 |
| --- a/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp |
| +++ b/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp |
| @@ -239,14 +239,16 @@ CPDF_Font* CBA_FontMap::GetAnnotDefaultFont(CFX_ByteString &sAlias) |
| } |
| CFX_ByteString sDA; |
| - |
| - sDA = FPDF_GetFieldAttr(m_pAnnotDict, "DA")->GetString(); |
| + CPDF_Object* pObj; |
| + if ( pObj = FPDF_GetFieldAttr(m_pAnnotDict, "DA")) |
|
Nico
2014/06/29 20:07:37
I patched in your change to check that it fixes al
Bo Xu
2014/06/30 00:31:59
Done
|
| + sDA = pObj->GetString(); |
| if (bWidget) |
| { |
| if (sDA.IsEmpty()) |
| { |
| - sDA = FPDF_GetFieldAttr(pAcroFormDict, "DA")->GetString(); |
| + pObj = FPDF_GetFieldAttr(pAcroFormDict, "DA"); |
| + sDA = pObj ? pObj->GetString() : CFX_ByteString(); |
| } |
| } |