File tree Expand file tree Collapse file tree
src/odr/internal/pdf_poppler Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,11 +29,11 @@ void PopplerPdfFile::open(const std::optional<std::string> &password) {
2929 } else if (const std::shared_ptr memory_file =
3030 std::dynamic_pointer_cast<MemoryFile>(m_file);
3131 memory_file != nullptr ) {
32- // ` stream` is freed by `m_pdf_doc`
33- auto stream = new MemStream ( memory_file->memory_data (), 0 ,
34- static_cast <Goffset>(memory_file->size ()),
35- Object (objNull));
36- m_pdf_doc = std::make_shared<PDFDoc>(stream, password_goo, password_goo);
32+ auto stream = std::make_unique<MemStream>(
33+ memory_file->memory_data (), 0 ,
34+ static_cast <Goffset>(memory_file->size ()), Object::null ());
35+ m_pdf_doc =
36+ std::make_shared<PDFDoc>(std::move ( stream) , password_goo, password_goo);
3737 } else {
3838 throw NoPdfFile ();
3939 }
You can’t perform that action at this time.
0 commit comments