aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDFAcroFormDocumentHelper.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libqpdf/QPDFAcroFormDocumentHelper.cc')
-rw-r--r--libqpdf/QPDFAcroFormDocumentHelper.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/libqpdf/QPDFAcroFormDocumentHelper.cc b/libqpdf/QPDFAcroFormDocumentHelper.cc
index 4e9f08b9..70d01b30 100644
--- a/libqpdf/QPDFAcroFormDocumentHelper.cc
+++ b/libqpdf/QPDFAcroFormDocumentHelper.cc
@@ -733,7 +733,8 @@ QPDFAcroFormDocumentHelper::adjustAppearanceStream(
auto existing_old = subdict.getKey(old_key);
if (!existing_old.isNull()) {
QTC::TC("qpdf", "QPDFAcroFormDocumentHelper ap rename");
- subdict.replaceKey(new_key, existing_old).removeKey(old_key);
+ subdict.replaceKey(new_key, existing_old);
+ subdict.removeKey(old_key);
}
}
}