diff options
Diffstat (limited to 'core/fpdfapi/parser/cfdf_document.cpp')
-rw-r--r-- | core/fpdfapi/parser/cfdf_document.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/fpdfapi/parser/cfdf_document.cpp b/core/fpdfapi/parser/cfdf_document.cpp index e66bfeb12b..a0f3e1490d 100644 --- a/core/fpdfapi/parser/cfdf_document.cpp +++ b/core/fpdfapi/parser/cfdf_document.cpp @@ -69,11 +69,12 @@ void CFDF_Document::ParseStream(IFX_SeekableReadStream* pFile, bool bOwnFile) { if (word != "obj") break; - CPDF_Object* pObj = parser.GetObject(this, objnum, 0, true); + auto pObj = pdfium::WrapUnique<CPDF_Object>( + parser.GetObject(this, objnum, 0, true)); if (!pObj) break; - ReplaceIndirectObjectIfHigherGeneration(objnum, pObj); + ReplaceIndirectObjectIfHigherGeneration(objnum, std::move(pObj)); word = parser.GetNextWord(nullptr); if (word != "endobj") break; |