aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libqpdf/QPDF.cc5
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();
+ }
}
}