From 34491c612d59b414cdeea47170d880a7f0783766 Mon Sep 17 00:00:00 2001 From: m-holger Date: Fri, 25 Aug 2023 12:21:25 +0100 Subject: Store indirect nulls in QPDF_Dictionary --- libqpdf/QPDF_Dictionary.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libqpdf/QPDF_Dictionary.cc b/libqpdf/QPDF_Dictionary.cc index 7700b81b..df83632c 100644 --- a/libqpdf/QPDF_Dictionary.cc +++ b/libqpdf/QPDF_Dictionary.cc @@ -121,7 +121,7 @@ QPDF_Dictionary::getAsMap() const void QPDF_Dictionary::replaceKey(std::string const& key, QPDFObjectHandle value) { - if (value.isNull()) { + if (value.isNull() && !value.isIndirect()) { // The PDF spec doesn't distinguish between keys with null values and missing keys. removeKey(key); } else { -- cgit v1.2.3-54-g00ecf