| Index: core/fpdfapi/page/cpdf_docpagedata.cpp
|
| diff --git a/core/fpdfapi/page/cpdf_docpagedata.cpp b/core/fpdfapi/page/cpdf_docpagedata.cpp
|
| index 7c45a04af164125742d0acd2b5b35b221ba49039..2c9f4bb1f781f9ada971cb364394db92511fc223 100644
|
| --- a/core/fpdfapi/page/cpdf_docpagedata.cpp
|
| +++ b/core/fpdfapi/page/cpdf_docpagedata.cpp
|
| @@ -175,7 +175,8 @@ CPDF_Font* CPDF_DocPageData::GetStandardFont(const CFX_ByteString& fontName,
|
| return fontData->AddRef();
|
| }
|
|
|
| - CPDF_Dictionary* pDict = new CPDF_Dictionary(m_pPDFDoc->GetByteStringPool());
|
| + CPDF_Dictionary* pDict =
|
| + m_pPDFDoc->NewIndirect<CPDF_Dictionary>(m_pPDFDoc->GetByteStringPool());
|
| pDict->SetNameFor("Type", "Font");
|
| pDict->SetNameFor("Subtype", "Type1");
|
| pDict->SetNameFor("BaseFont", fontName);
|
| @@ -183,7 +184,7 @@ CPDF_Font* CPDF_DocPageData::GetStandardFont(const CFX_ByteString& fontName,
|
| pDict->SetFor("Encoding",
|
| pEncoding->Realize(m_pPDFDoc->GetByteStringPool()));
|
| }
|
| - m_pPDFDoc->AddIndirectObject(pDict);
|
| +
|
| std::unique_ptr<CPDF_Font> pFont = CPDF_Font::Create(m_pPDFDoc, pDict);
|
| if (!pFont)
|
| return nullptr;
|
|
|