aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDFEFStreamObjectHelper.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libqpdf/QPDFEFStreamObjectHelper.cc')
-rw-r--r--libqpdf/QPDFEFStreamObjectHelper.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/libqpdf/QPDFEFStreamObjectHelper.cc b/libqpdf/QPDFEFStreamObjectHelper.cc
index fe27a86e..5810cf37 100644
--- a/libqpdf/QPDFEFStreamObjectHelper.cc
+++ b/libqpdf/QPDFEFStreamObjectHelper.cc
@@ -28,8 +28,8 @@ QPDFEFStreamObjectHelper::setParam(
{
auto params = this->oh.getDict().getKey("/Params");
if (!params.isDictionary()) {
- params = QPDFObjectHandle::newDictionary();
- this->oh.getDict().replaceKey("/Params", params);
+ params = this->oh.getDict().replaceKeyAndGet(
+ "/Params", QPDFObjectHandle::newDictionary());
}
params.replaceKey(pkey, pval);
}