Index: core/fpdfapi/parser/cpdf_array.cpp |
diff --git a/core/fpdfapi/parser/cpdf_array.cpp b/core/fpdfapi/parser/cpdf_array.cpp |
index 9a2dba01610c80a5124cceae4755c68ac835095b..0d0c02f28dc4acf8ce4d4d1eaf34160ea3137655 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(); |
} |
} |