diff options
author | Jay Berkenbilt <ejb@ql.org> | 2019-08-22 23:53:20 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2019-08-22 23:55:16 +0200 |
commit | 4b2e72c4cd7dc9bc17ad78ca983ff884c1e1ee69 (patch) | |
tree | af9dc8355ef29d6fd96a771ad9bb9de7f6ce70b6 /libqpdf/QPDFObjectHandle.cc | |
parent | 3f3dbe22eaae56df48af304c35a1c0b5dd976135 (diff) | |
download | qpdf-4b2e72c4cd7dc9bc17ad78ca983ff884c1e1ee69.tar.zst |
Test for direct, rather than resolved nulls in parser
Just because we know an indirect reference is null, doesn't mean we
shouldn't keep it indirect.
Diffstat (limited to 'libqpdf/QPDFObjectHandle.cc')
-rw-r--r-- | libqpdf/QPDFObjectHandle.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libqpdf/QPDFObjectHandle.cc b/libqpdf/QPDFObjectHandle.cc index 6240395d..c58675a4 100644 --- a/libqpdf/QPDFObjectHandle.cc +++ b/libqpdf/QPDFObjectHandle.cc @@ -263,9 +263,10 @@ QPDFObjectHandle::isBool() } bool -QPDFObjectHandle::isResolvedNull() const +QPDFObjectHandle::isDirectNull() const { - return QPDFObjectTypeAccessor<QPDF_Null>::check(m->obj.getPointer()); + return (this->m->initialized && (this->m->objid == 0) && + QPDFObjectTypeAccessor<QPDF_Null>::check(m->obj.getPointer())); } bool |