summaryrefslogtreecommitdiff
path: root/xfa/fxfa
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa')
-rw-r--r--xfa/fxfa/parser/cxfa_document.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/xfa/fxfa/parser/cxfa_document.cpp b/xfa/fxfa/parser/cxfa_document.cpp
index 4ed337019b..5c4b55776a 100644
--- a/xfa/fxfa/parser/cxfa_document.cpp
+++ b/xfa/fxfa/parser/cxfa_document.cpp
@@ -1283,7 +1283,9 @@ CXFA_Document::CXFA_Document(CXFA_FFNotify* notify)
m_dwDocFlags(0) {}
CXFA_Document::~CXFA_Document() {
- // Remove all the bindings before freeing the node as the ownership is wonky.
+ // The destruction order of the nodes is not known because they're stored in a
+ // list in the document. Therefore. the binding nodes must be released before
+ // freeing the nodes to avoid dangling UnownedPtrs.
if (m_pRootNode)
m_pRootNode->ReleaseBindingNodes();
}