diff options
author | Jay Berkenbilt <jberkenbilt@users.noreply.github.com> | 2023-04-15 18:30:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-15 18:30:41 +0200 |
commit | 989819b75fba380ecdc7416a504ed4b3a2d42ccb (patch) | |
tree | bc316f24cb424286a2341e0855211bfdc613c336 /libqpdf | |
parent | 7e77af3583c76b0af4c4cfa2873e1ca2810d484a (diff) | |
parent | 08d7b56746a93c25db2991403fec7e56cbae132d (diff) | |
download | qpdf-989819b75fba380ecdc7416a504ed4b3a2d42ccb.tar.zst |
Merge pull request #947 from m-holger/null
Prevent destruction of shared null objects
Diffstat (limited to 'libqpdf')
-rw-r--r-- | libqpdf/QPDF.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libqpdf/QPDF.cc b/libqpdf/QPDF.cc index 83944be4..c7cc1370 100644 --- a/libqpdf/QPDF.cc +++ b/libqpdf/QPDF.cc @@ -247,10 +247,11 @@ QPDF::~QPDF() // but we'll explicitly clear the xref table anyway just to // prevent any possibility of resolve() succeeding. this->m->xref_table.clear(); - auto null_obj = QPDF_Null::create(); for (auto const& iter: this->m->obj_cache) { iter.second.object->disconnect(); - iter.second.object->destroy(); + if (iter.second.object->getTypeCode() != ::ot_null) { + iter.second.object->destroy(); + } } } |