| Index: fpdfsdk/formfiller/cba_fontmap.cpp
|
| diff --git a/fpdfsdk/formfiller/cba_fontmap.cpp b/fpdfsdk/formfiller/cba_fontmap.cpp
|
| index 8a981690f1cf637fa35404648f01e916ae2aba78..3b715d7332b205da6acfd1e1998f03e14be1d0a3 100644
|
| --- a/fpdfsdk/formfiller/cba_fontmap.cpp
|
| +++ b/fpdfsdk/formfiller/cba_fontmap.cpp
|
| @@ -154,9 +154,8 @@ void CBA_FontMap::AddFontToAnnotDict(CPDF_Font* pFont,
|
| return;
|
|
|
| CPDF_Dictionary* pAPDict = m_pAnnotDict->GetDictFor("AP");
|
| -
|
| if (!pAPDict) {
|
| - pAPDict = new CPDF_Dictionary;
|
| + pAPDict = new CPDF_Dictionary(m_pDocument);
|
| m_pAnnotDict->SetFor("AP", pAPDict);
|
| }
|
|
|
| @@ -173,23 +172,22 @@ void CBA_FontMap::AddFontToAnnotDict(CPDF_Font* pFont,
|
| }
|
|
|
| CPDF_Dictionary* pStreamDict = pStream->GetDict();
|
| -
|
| if (!pStreamDict) {
|
| - pStreamDict = new CPDF_Dictionary;
|
| + pStreamDict = new CPDF_Dictionary(m_pDocument);
|
| pStream->InitStream(nullptr, 0, pStreamDict);
|
| }
|
|
|
| if (pStreamDict) {
|
| CPDF_Dictionary* pStreamResList = pStreamDict->GetDictFor("Resources");
|
| if (!pStreamResList) {
|
| - pStreamResList = new CPDF_Dictionary();
|
| + pStreamResList = new CPDF_Dictionary(m_pDocument);
|
| pStreamDict->SetFor("Resources", pStreamResList);
|
| }
|
|
|
| if (pStreamResList) {
|
| CPDF_Dictionary* pStreamResFontList = pStreamResList->GetDictFor("Font");
|
| if (!pStreamResFontList) {
|
| - pStreamResFontList = new CPDF_Dictionary;
|
| + pStreamResFontList = new CPDF_Dictionary(m_pDocument);
|
| int32_t objnum = m_pDocument->AddIndirectObject(pStreamResFontList);
|
| pStreamResList->SetReferenceFor("Font", m_pDocument, objnum);
|
| }
|
|
|