diff options
Diffstat (limited to 'libqpdf/QPDFObjectHandle.cc')
-rw-r--r-- | libqpdf/QPDFObjectHandle.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/libqpdf/QPDFObjectHandle.cc b/libqpdf/QPDFObjectHandle.cc index fa8aae7f..556e3a1e 100644 --- a/libqpdf/QPDFObjectHandle.cc +++ b/libqpdf/QPDFObjectHandle.cc @@ -252,8 +252,10 @@ void QPDFObjectHandle::reset() { // Recursively remove association with any QPDF object. This - // method may only be called during final destruction. See - // comments in QPDF::~QPDF(). + // 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()) { this->obj->reset(); } @@ -352,6 +354,12 @@ QPDFObjectHandle::asString() } bool +QPDFObjectHandle::isDestroyed() +{ + return dereference() && (obj->getTypeCode() == ::ot_destroyed); +} + +bool QPDFObjectHandle::isBool() { return dereference() && (obj->getTypeCode() == ::ot_boolean); |