summaryrefslogtreecommitdiff
path: root/xfa/fxfa
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa')
-rw-r--r--xfa/fxfa/parser/cxfa_node.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/xfa/fxfa/parser/cxfa_node.cpp b/xfa/fxfa/parser/cxfa_node.cpp
index 3823d2eae0..7122d95bff 100644
--- a/xfa/fxfa/parser/cxfa_node.cpp
+++ b/xfa/fxfa/parser/cxfa_node.cpp
@@ -4678,8 +4678,10 @@ void CXFA_Node::SetToXML(const WideString& value) {
}
}
}
- if (bDeleteChildren)
- elem->DeleteChildren();
+ if (bDeleteChildren) {
+ while (auto* child = GetLastChild())
+ RemoveChild(child, false);
+ }
elem->SetTextData(value);
break;