Commit c1afe9f83bee238cce3cd68619d22c21bd7541a7

Authored by Jay Berkenbilt
Committed by GitHub
2 parents 37bc43b6 d531309c

Merge pull request #1012 from m-holger/i1011

Fix QPDFObjectHandle::disconnect (partially fixes #1011)
Showing 1 changed file with 1 additions and 1 deletions
libqpdf/QPDFObjectHandle.cc
@@ -231,7 +231,7 @@ QPDFObjectHandle::disconnect() @@ -231,7 +231,7 @@ QPDFObjectHandle::disconnect()
231 // Recursively remove association with any QPDF object. This method may only be called during 231 // Recursively remove association with any QPDF object. This method may only be called during
232 // final destruction. QPDF::~QPDF() calls it for indirect objects using the object pointer 232 // final destruction. QPDF::~QPDF() calls it for indirect objects using the object pointer
233 // itself, so we don't do that here. Other objects call it through this method. 233 // itself, so we don't do that here. Other objects call it through this method.
234 - if (!isIndirect()) { 234 + if (obj && !isIndirect()) {
235 this->obj->disconnect(); 235 this->obj->disconnect();
236 } 236 }
237 } 237 }