Commit 34491c612d59b414cdeea47170d880a7f0783766

Authored by m-holger
1 parent fedd4219

Store indirect nulls in QPDF_Dictionary

Showing 1 changed file with 1 additions and 1 deletions
libqpdf/QPDF_Dictionary.cc
@@ -121,7 +121,7 @@ QPDF_Dictionary::getAsMap() const @@ -121,7 +121,7 @@ QPDF_Dictionary::getAsMap() const
121 void 121 void
122 QPDF_Dictionary::replaceKey(std::string const& key, QPDFObjectHandle value) 122 QPDF_Dictionary::replaceKey(std::string const& key, QPDFObjectHandle value)
123 { 123 {
124 - if (value.isNull()) { 124 + if (value.isNull() && !value.isIndirect()) {
125 // The PDF spec doesn't distinguish between keys with null values and missing keys. 125 // The PDF spec doesn't distinguish between keys with null values and missing keys.
126 removeKey(key); 126 removeKey(key);
127 } else { 127 } else {