summaryrefslogtreecommitdiff
path: root/fxjs/xfa/cjx_object.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fxjs/xfa/cjx_object.cpp')
-rw-r--r--fxjs/xfa/cjx_object.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/fxjs/xfa/cjx_object.cpp b/fxjs/xfa/cjx_object.cpp
index 6408cf3eb9..4f3b6adbc8 100644
--- a/fxjs/xfa/cjx_object.cpp
+++ b/fxjs/xfa/cjx_object.cpp
@@ -1477,12 +1477,13 @@ void CJX_Object::Script_Field_Length(CFXJSE_Value* pValue,
ThrowInvalidPropertyException();
return;
}
- if (!ToNode(object_.Get())->GetWidgetAcc()) {
+
+ CXFA_Node* node = ToNode(object_.Get());
+ if (!node->IsWidgetReady()) {
pValue->SetInteger(0);
return;
}
- pValue->SetInteger(
- ToNode(object_.Get())->GetWidgetAcc()->CountChoiceListItems(true));
+ pValue->SetInteger(node->GetWidgetAcc()->CountChoiceListItems(true));
}
void CJX_Object::Script_Som_DefaultValue(CFXJSE_Value* pValue,