diff options
Diffstat (limited to 'libqpdf/QPDFJob.cc')
-rw-r--r-- | libqpdf/QPDFJob.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libqpdf/QPDFJob.cc b/libqpdf/QPDFJob.cc index 692e6420..08b5b9d7 100644 --- a/libqpdf/QPDFJob.cc +++ b/libqpdf/QPDFJob.cc @@ -1958,8 +1958,8 @@ QPDFJob::doUnderOverlayForPage( QPDFObjectHandle resources = dest_page.getAttribute("/Resources", true); if (!resources.isDictionary()) { QTC::TC("qpdf", "QPDFJob overlay page with no resources"); - resources = QPDFObjectHandle::newDictionary(); - dest_page.getObjectHandle().replaceKey("/Resources", resources); + resources = dest_page.getObjectHandle().replaceKeyAndGet( + "/Resources", QPDFObjectHandle::newDictionary()); } for (std::vector<int>::iterator iter = pagenos[pageno].begin(); iter != pagenos[pageno].end(); |