summaryrefslogtreecommitdiff
path: root/fxjs/xfa/cjx_object.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2018-01-11 14:51:11 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-01-11 14:51:11 +0000
commit61dfd72ab3a913b143c03bdcf4ec5816dcb09cd1 (patch)
treeecad6d7951ca1f9b09f7674e3675048043adaa45 /fxjs/xfa/cjx_object.cpp
parent7d2c5f4c8d33d57b76af1c471e70af36db090072 (diff)
downloadpdfium-61dfd72ab3a913b143c03bdcf4ec5816dcb09cd1.tar.xz
Rename GetItem to GetItemIfExists
Rename GetItem to make it clearer it can return nullptr. Change-Id: I0e09a79c3e2244b08212d3b51d3ad0e6a86edfd9 Reviewed-on: https://pdfium-review.googlesource.com/22713 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fxjs/xfa/cjx_object.cpp')
-rw-r--r--fxjs/xfa/cjx_object.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/fxjs/xfa/cjx_object.cpp b/fxjs/xfa/cjx_object.cpp
index cb76497618..8608cc0e8d 100644
--- a/fxjs/xfa/cjx_object.cpp
+++ b/fxjs/xfa/cjx_object.cpp
@@ -1629,12 +1629,12 @@ void CJX_Object::Script_Som_InstanceIndex(CFXJSE_Value* pValue,
if (!pNotify)
return;
- CXFA_Node* pToInstance = pManagerNode->GetItem(iTo);
+ CXFA_Node* pToInstance = pManagerNode->GetItemIfExists(iTo);
if (pToInstance && pToInstance->GetElementType() == XFA_Element::Subform) {
pNotify->RunSubformIndexChange(pToInstance);
}
- CXFA_Node* pFromInstance = pManagerNode->GetItem(iFrom);
+ CXFA_Node* pFromInstance = pManagerNode->GetItemIfExists(iFrom);
if (pFromInstance &&
pFromInstance->GetElementType() == XFA_Element::Subform) {
pNotify->RunSubformIndexChange(pFromInstance);