summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser/cpdf_array.cpp
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-10-10 14:31:05 -0700
committerCommit bot <commit-bot@chromium.org>2016-10-10 14:31:05 -0700
commit836f7d5d23b0951c8be86ccca54ebad43179febe (patch)
tree08225e327d16b7d12c1f68e3c5a10c4158af4809 /core/fpdfapi/parser/cpdf_array.cpp
parent381fc833ac9e6ea58762b7e7ac8b7f2129e8477f (diff)
downloadpdfium-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_array.cpp')
-rw-r--r--core/fpdfapi/parser/cpdf_array.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/fpdfapi/parser/cpdf_array.cpp b/core/fpdfapi/parser/cpdf_array.cpp
index 9a2dba0161..0d0c02f28d 100644
--- a/core/fpdfapi/parser/cpdf_array.cpp
+++ b/core/fpdfapi/parser/cpdf_array.cpp
@@ -23,7 +23,7 @@ CPDF_Array::~CPDF_Array() {
// in case of cyclic references.
m_ObjNum = kInvalidObjNum;
for (auto& it : m_Objects) {
- if (it)
+ if (it && it->GetObjNum() != kInvalidObjNum)
it->Release();
}
}