aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf
diff options
context:
space:
mode:
authorm-holger <m-holger@kubitscheck.org>2023-07-24 19:51:30 +0200
committerm-holger <m-holger@kubitscheck.org>2023-07-24 19:51:30 +0200
commitd531309cf97d417f20276691a0c66d2404a51651 (patch)
treef0c3cd540cda190d4f5697fe5da079df3f5a9087 /libqpdf
parent37bc43b6dd28cf20e99479f9b041238859c0ca68 (diff)
downloadqpdf-d531309cf97d417f20276691a0c66d2404a51651.tar.zst
Fix QPDFObjectHandle::disconnect (partially fixes #1011)
Diffstat (limited to 'libqpdf')
-rw-r--r--libqpdf/QPDFObjectHandle.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/libqpdf/QPDFObjectHandle.cc b/libqpdf/QPDFObjectHandle.cc
index 3ce748b0..17894560 100644
--- a/libqpdf/QPDFObjectHandle.cc
+++ b/libqpdf/QPDFObjectHandle.cc
@@ -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();
}
}