Index: core/fpdfapi/parser/cpdf_dictionary.cpp |
diff --git a/core/fpdfapi/parser/cpdf_dictionary.cpp b/core/fpdfapi/parser/cpdf_dictionary.cpp |
index 7ef5a5355141ac8e00187bdb2aec80f389c7d0ec..31f520af0de82771ca77f39d48702f0a91c2a2e7 100644 |
--- a/core/fpdfapi/parser/cpdf_dictionary.cpp |
+++ b/core/fpdfapi/parser/cpdf_dictionary.cpp |
@@ -30,7 +30,7 @@ CPDF_Dictionary::~CPDF_Dictionary() { |
// in case of cyclic references. |
m_ObjNum = kInvalidObjNum; |
for (const auto& it : m_Map) { |
- if (it.second) |
+ if (it.second && it.second->GetObjNum() != kInvalidObjNum) |
it.second->Release(); |
} |
} |