aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDFParser.cc
diff options
context:
space:
mode:
authorm-holger <m-holger@kubitscheck.org>2022-11-24 17:50:46 +0100
committerJay Berkenbilt <jberkenbilt@users.noreply.github.com>2022-11-26 22:26:42 +0100
commit3f632458ae15b5c63b639e46bf2d89653401d8aa (patch)
tree049dbe49c80aa972123e3bd01260fb3109a99eb0 /libqpdf/QPDFParser.cc
parent19a8d3fea22ebaf68ae65ac871b20eb7e0e62bc7 (diff)
downloadqpdf-3f632458ae15b5c63b639e46bf2d89653401d8aa.tar.zst
Refactor QPDF::fixDanglingReferences
Diffstat (limited to 'libqpdf/QPDFParser.cc')
-rw-r--r--libqpdf/QPDFParser.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/libqpdf/QPDFParser.cc b/libqpdf/QPDFParser.cc
index 452e741b..eca55a71 100644
--- a/libqpdf/QPDFParser.cc
+++ b/libqpdf/QPDFParser.cc
@@ -190,6 +190,11 @@ QPDFParser::parse(bool& empty, bool content_stream)
olist.at(size - 2).getIntValueAsInt(),
olist.back().getIntValueAsInt());
if (ref_og.isIndirect()) {
+ // This action has the desirable side effect
+ // of causing dangling references (references
+ // to indirect objects that don't appear in
+ // the PDF) in any parsed object to appear in
+ // the object cache.
object = context->getObject(ref_og);
indirect_ref = true;
} else {