summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/fpdfapi/fpdf_parser/cpdf_dictionary.cpp1
-rw-r--r--core/fpdfdoc/cpdf_formfield_unittest.cpp1
2 files changed, 1 insertions, 1 deletions
diff --git a/core/fpdfapi/fpdf_parser/cpdf_dictionary.cpp b/core/fpdfapi/fpdf_parser/cpdf_dictionary.cpp
index cc395a2e08..aeee3382f9 100644
--- a/core/fpdfapi/fpdf_parser/cpdf_dictionary.cpp
+++ b/core/fpdfapi/fpdf_parser/cpdf_dictionary.cpp
@@ -169,6 +169,7 @@ bool CPDF_Dictionary::IsSignatureDict() const {
}
void CPDF_Dictionary::SetFor(const CFX_ByteString& key, CPDF_Object* pObj) {
+ ASSERT(!pObj || pObj->GetObjNum() == 0);
auto it = m_Map.find(key);
if (it == m_Map.end()) {
if (pObj)
diff --git a/core/fpdfdoc/cpdf_formfield_unittest.cpp b/core/fpdfdoc/cpdf_formfield_unittest.cpp
index 7677f45284..d6feff9718 100644
--- a/core/fpdfdoc/cpdf_formfield_unittest.cpp
+++ b/core/fpdfdoc/cpdf_formfield_unittest.cpp
@@ -26,7 +26,6 @@ TEST(cpdf_formfield, FPDF_GetFullName) {
EXPECT_STREQ("bar.foo", name.UTF8Encode().c_str());
CPDF_Dictionary* dict2 = new CPDF_Dictionary;
- obj_holder.AddIndirectObject(dict2);
dict1->SetFor("Parent", dict2);
name = FPDF_GetFullName(root);
EXPECT_STREQ("bar.foo", name.UTF8Encode().c_str());