diff options
Diffstat (limited to 'fxjs/xfa')
-rw-r--r-- | fxjs/xfa/cjx_field.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fxjs/xfa/cjx_field.cpp b/fxjs/xfa/cjx_field.cpp index 0007bad592..299c6ef3a4 100644 --- a/fxjs/xfa/cjx_field.cpp +++ b/fxjs/xfa/cjx_field.cpp @@ -272,7 +272,8 @@ void CJX_Field::defaultValue(CFXJSE_Value* pValue, } CXFA_Node* pUIChild = pWidgetAcc->GetUIChild(); - CXFA_Node* pNode = xfaNode->GetFormValue()->GetFirstChild(); + CXFA_Node* formValue = xfaNode->GetFormValueIfExists(); + CXFA_Node* pNode = formValue ? formValue->GetFirstChild() : nullptr; if (pNode && pNode->GetElementType() == XFA_Element::Decimal) { if (pUIChild->GetElementType() == XFA_Element::NumericEdit && (pNode->JSObject()->GetInteger(XFA_Attribute::FracDigits) == -1)) { |