aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDFObjectHandle.cc
diff options
context:
space:
mode:
authorm-holger <m-holger@kubitscheck.org>2022-12-16 15:53:47 +0100
committerJay Berkenbilt <jberkenbilt@users.noreply.github.com>2022-12-31 16:23:59 +0100
commite684d8169bc866c413b269005c7645fd28146d10 (patch)
tree79d70c6f6c0d161b4d3810b6a0235d661ef3a926 /libqpdf/QPDFObjectHandle.cc
parent218f069a69ef74d0b0cc9c7ba0796e9360cef379 (diff)
downloadqpdf-e684d8169bc866c413b269005c7645fd28146d10.tar.zst
Make QPDFValue::object_description a shared pointer
Diffstat (limited to 'libqpdf/QPDFObjectHandle.cc')
-rw-r--r--libqpdf/QPDFObjectHandle.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/libqpdf/QPDFObjectHandle.cc b/libqpdf/QPDFObjectHandle.cc
index 169a930d..5457c68c 100644
--- a/libqpdf/QPDFObjectHandle.cc
+++ b/libqpdf/QPDFObjectHandle.cc
@@ -2176,7 +2176,8 @@ QPDFObjectHandle::setObjectDescription(
// This is called during parsing on newly created direct objects,
// so we can't call dereference() here.
if (isInitialized() && obj.get()) {
- obj->setDescription(owning_qpdf, object_description);
+ auto descr = std::make_shared<std::string>(object_description);
+ obj->setDescription(owning_qpdf, descr);
}
}