2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-12-22 19:08:59 +00:00

Merge pull request #1012 from m-holger/i1011

Fix QPDFObjectHandle::disconnect (partially fixes #1011)
This commit is contained in:
Jay Berkenbilt 2023-07-24 15:01:01 -04:00 committed by GitHub
commit c1afe9f83b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -231,7 +231,7 @@ QPDFObjectHandle::disconnect()
// Recursively remove association with any QPDF object. This method may only be called during
// final destruction. QPDF::~QPDF() calls it for indirect objects using the object pointer
// itself, so we don't do that here. Other objects call it through this method.
if (!isIndirect()) {
if (obj && !isIndirect()) {
this->obj->disconnect();
}
}