diff options
author | tsepez <tsepez@chromium.org> | 2016-10-10 14:31:05 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-10-10 14:31:05 -0700 |
commit | 836f7d5d23b0951c8be86ccca54ebad43179febe (patch) | |
tree | 08225e327d16b7d12c1f68e3c5a10c4158af4809 /core/fpdfapi/parser/cpdf_stream.cpp | |
parent | 381fc833ac9e6ea58762b7e7ac8b7f2129e8477f (diff) | |
download | pdfium-836f7d5d23b0951c8be86ccca54ebad43179febe.tar.xz |
Land all the fixes from 5609f39c but don't enable assertchromium/2887
Split this off so that we don't keep losing this when
the assert is reverted again.
Review-Url: https://codereview.chromium.org/2401423005
Diffstat (limited to 'core/fpdfapi/parser/cpdf_stream.cpp')
-rw-r--r-- | core/fpdfapi/parser/cpdf_stream.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/core/fpdfapi/parser/cpdf_stream.cpp b/core/fpdfapi/parser/cpdf_stream.cpp index c221edec68..935c80c5c8 100644 --- a/core/fpdfapi/parser/cpdf_stream.cpp +++ b/core/fpdfapi/parser/cpdf_stream.cpp @@ -17,7 +17,11 @@ CPDF_Stream::CPDF_Stream() {} CPDF_Stream::CPDF_Stream(uint8_t* pData, uint32_t size, CPDF_Dictionary* pDict) : m_pDict(pDict), m_dwSize(size), m_pDataBuf(pData) {} -CPDF_Stream::~CPDF_Stream() {} +CPDF_Stream::~CPDF_Stream() { + m_ObjNum = kInvalidObjNum; + if (m_pDict && m_pDict->GetObjNum() == kInvalidObjNum) + m_pDict.release(); // lowercase release, release ownership. +} CPDF_Object::Type CPDF_Stream::GetType() const { return STREAM; |