summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_ffdatetimeedit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa/cxfa_ffdatetimeedit.cpp')
-rw-r--r--xfa/fxfa/cxfa_ffdatetimeedit.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/xfa/fxfa/cxfa_ffdatetimeedit.cpp b/xfa/fxfa/cxfa_ffdatetimeedit.cpp
index 7958162a89..1b2f6e3221 100644
--- a/xfa/fxfa/cxfa_ffdatetimeedit.cpp
+++ b/xfa/fxfa/cxfa_ffdatetimeedit.cpp
@@ -50,7 +50,8 @@ bool CXFA_FFDateTimeEdit::LoadWidget() {
WideString wsText;
m_pDataAcc->GetValue(wsText, XFA_VALUEPICTURE_Display);
pWidget->SetEditText(wsText);
- if (CXFA_ValueData valueData = m_pDataAcc->GetFormValueData()) {
+ CXFA_ValueData valueData = m_pDataAcc->GetFormValueData();
+ if (valueData.HasValidNode()) {
switch (valueData.GetChildValueClassID()) {
case XFA_Element::Date: {
if (!wsText.IsEmpty()) {
@@ -97,7 +98,7 @@ void CXFA_FFDateTimeEdit::UpdateWidgetProperty() {
uint32_t CXFA_FFDateTimeEdit::GetAlignment() {
CXFA_ParaData paraData = m_pDataAcc->GetParaData();
- if (!paraData)
+ if (!paraData.HasValidNode())
return 0;
uint32_t dwExtendedStyle = 0;