summaryrefslogtreecommitdiff
path: root/fxjs/xfa/cjx_exclgroup.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fxjs/xfa/cjx_exclgroup.cpp')
-rw-r--r--fxjs/xfa/cjx_exclgroup.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/fxjs/xfa/cjx_exclgroup.cpp b/fxjs/xfa/cjx_exclgroup.cpp
index 8d814dc125..7daea71749 100644
--- a/fxjs/xfa/cjx_exclgroup.cpp
+++ b/fxjs/xfa/cjx_exclgroup.cpp
@@ -85,10 +85,11 @@ CJS_Return CJX_ExclGroup::selectedMember(
if (!params.empty())
return CJS_Return(JSGetStringFromID(JSMessage::kParamError));
- CXFA_WidgetAcc* pWidgetAcc = ToNode(GetXFAObject())->GetWidgetAcc();
- if (!pWidgetAcc)
+ CXFA_Node* node = GetXFANode();
+ if (!node->IsWidgetReady())
return CJS_Return(runtime->NewNull());
+ CXFA_WidgetAcc* pWidgetAcc = node->GetWidgetAcc();
CXFA_Node* pReturnNode = nullptr;
if (params.empty()) {
pReturnNode = pWidgetAcc->GetSelectedMember();
@@ -110,13 +111,13 @@ CJS_Return CJX_ExclGroup::selectedMember(
void CJX_ExclGroup::defaultValue(CFXJSE_Value* pValue,
bool bSetting,
XFA_Attribute eAttribute) {
- CXFA_WidgetAcc* pWidgetAcc = GetXFANode()->GetWidgetAcc();
- if (!pWidgetAcc)
+ CXFA_Node* node = GetXFANode();
+ if (!node->IsWidgetReady())
return;
if (bSetting) {
- pWidgetAcc->SetSelectedMemberByValue(pValue->ToWideString().AsStringView(),
- true, true, true);
+ node->GetWidgetAcc()->SetSelectedMemberByValue(
+ pValue->ToWideString().AsStringView(), true, true, true);
return;
}