mirror of
https://github.com/qpdf/qpdf.git
synced 2024-09-28 21:19:06 +00:00
dba61da1bf
When a QPDF is destroyed, changing indirect objects to direct nulls makes them effectively disappear silently when they sneak into other places. Instead, we should treat this as an error. Adding a destroyed object type makes this possible.
19 lines
346 B
C++
19 lines
346 B
C++
#include <qpdf/QPDFValueProxy.hh>
|
|
|
|
#include <qpdf/QPDF.hh>
|
|
#include <qpdf/QPDF_Destroyed.hh>
|
|
|
|
void
|
|
QPDFValueProxy::doResolve()
|
|
{
|
|
auto og = value->og;
|
|
QPDF::Resolver::resolve(value->qpdf, og);
|
|
}
|
|
|
|
void
|
|
QPDFValueProxy::destroy()
|
|
{
|
|
// See comments in reset() for why this isn't part of reset.
|
|
value = QPDF_Destroyed::getInstance();
|
|
}
|