summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorm-holger <m-holger@kubitscheck.org>2023-08-25 13:21:25 +0200
committerm-holger <m-holger@kubitscheck.org>2023-08-25 13:21:25 +0200
commit34491c612d59b414cdeea47170d880a7f0783766 (patch)
treef04f515dfe5ffb92da7fa4f2917763c6c800a2c9
parentfedd42191f0eec498ba1c22ef13beae0f37387aa (diff)
downloadqpdf-34491c612d59b414cdeea47170d880a7f0783766.tar.zst
Store indirect nulls in QPDF_Dictionary
-rw-r--r--libqpdf/QPDF_Dictionary.cc2
1 files changed, 1 insertions, 1 deletions
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 {