diff options
Diffstat (limited to 'libqpdf/QPDFAcroFormDocumentHelper.cc')
-rw-r--r-- | libqpdf/QPDFAcroFormDocumentHelper.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libqpdf/QPDFAcroFormDocumentHelper.cc b/libqpdf/QPDFAcroFormDocumentHelper.cc index 256fa694..ad6efc70 100644 --- a/libqpdf/QPDFAcroFormDocumentHelper.cc +++ b/libqpdf/QPDFAcroFormDocumentHelper.cc @@ -1002,8 +1002,10 @@ QPDFAcroFormDocumentHelper::transformAnnotations( } // Merge the other document's /DR, creating a conflict // map. mergeResources checks to make sure both objects - // are dictionaries. - from_dr.makeResourcesIndirect(*from_qpdf); + // are dictionaries. By this point, if this is foreign, + // from_dr has been copied, so we use the target qpdf as + // the owning qpdf. + from_dr.makeResourcesIndirect(this->qpdf); dr.mergeResources(from_dr, &dr_map); if (from_afdh->getNeedAppearances()) |