mirror of
https://github.com/qpdf/qpdf.git
synced 2025-02-08 22:58:25 +00:00
Merge pull request #947 from m-holger/null
Prevent destruction of shared null objects
This commit is contained in:
commit
989819b75f
@ -247,10 +247,11 @@ QPDF::~QPDF()
|
|||||||
// but we'll explicitly clear the xref table anyway just to
|
// but we'll explicitly clear the xref table anyway just to
|
||||||
// prevent any possibility of resolve() succeeding.
|
// prevent any possibility of resolve() succeeding.
|
||||||
this->m->xref_table.clear();
|
this->m->xref_table.clear();
|
||||||
auto null_obj = QPDF_Null::create();
|
|
||||||
for (auto const& iter: this->m->obj_cache) {
|
for (auto const& iter: this->m->obj_cache) {
|
||||||
iter.second.object->disconnect();
|
iter.second.object->disconnect();
|
||||||
iter.second.object->destroy();
|
if (iter.second.object->getTypeCode() != ::ot_null) {
|
||||||
|
iter.second.object->destroy();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user