diff options
Diffstat (limited to 'include/qpdf/QPDFObjectHandle.hh')
-rw-r--r-- | include/qpdf/QPDFObjectHandle.hh | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/include/qpdf/QPDFObjectHandle.hh b/include/qpdf/QPDFObjectHandle.hh index 7bf4e210..c1bed81f 100644 --- a/include/qpdf/QPDFObjectHandle.hh +++ b/include/qpdf/QPDFObjectHandle.hh @@ -1588,7 +1588,7 @@ class QPDFObjectHandle void shallowCopyInternal(QPDFObjectHandle& oh, bool first_level_only); void releaseResolved(); - void setParsedOffset(qpdf_offset_t offset); + inline void setParsedOffset(qpdf_offset_t offset); void parseContentStream_internal( std::string const& description, ParserCallbacks* callbacks); static void parseContentStream_data( @@ -1872,4 +1872,14 @@ QPDFObjectHandle::getOwningQPDF( return this->qpdf; } +inline void +QPDFObjectHandle::setParsedOffset(qpdf_offset_t offset) +{ + // This is called during parsing on newly created direct objects, + // so we can't call dereference() here. + if (this->obj.get()) { + this->obj->setParsedOffset(offset); + } +} + #endif // QPDFOBJECTHANDLE_HH |