aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDFObjectHandle.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libqpdf/QPDFObjectHandle.cc')
-rw-r--r--libqpdf/QPDFObjectHandle.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/libqpdf/QPDFObjectHandle.cc b/libqpdf/QPDFObjectHandle.cc
index a1019955..83369b54 100644
--- a/libqpdf/QPDFObjectHandle.cc
+++ b/libqpdf/QPDFObjectHandle.cc
@@ -243,12 +243,12 @@ QPDFObjectHandle::releaseResolved()
// Do not cross over indirect object boundaries to avoid an
// infinite loop. This method may only be called during final
// destruction. See comments in QPDF::~QPDF().
- if (isIndirect()) {
- if (this->obj.get()) {
+ if (this->obj.get()) {
+ if (isIndirect()) {
this->obj = nullptr;
+ } else {
+ this->obj->releaseResolved();
}
- } else {
- QPDFObject::ObjAccessor::releaseResolved(this->obj.get());
}
}