Index: core/fpdfapi/fpdf_parser/cpdf_array.cpp |
diff --git a/core/fpdfapi/fpdf_parser/cpdf_array.cpp b/core/fpdfapi/fpdf_parser/cpdf_array.cpp |
index 26e65bca3463def701abd0130af9eba67f87ca39..a3be55b9f0cb1977e6073245f8c760ccadf6bcd6 100644 |
--- a/core/fpdfapi/fpdf_parser/cpdf_array.cpp |
+++ b/core/fpdfapi/fpdf_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(); |
} |
} |