diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2018-01-11 14:11:41 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-01-11 14:11:41 +0000 |
commit | 382129e2bdb1337a5a82cbd96478aab02f9aff7d (patch) | |
tree | f0c4ffd0bd63a5a8180ac54fe06cff3794466a74 /xfa/fxfa/cxfa_ffwidgethandler.cpp | |
parent | b5835183116559ea8225b7d8cc67c6f55bed7a1a (diff) | |
download | pdfium-382129e2bdb1337a5a82cbd96478aab02f9aff7d.tar.xz |
Rename GetCalculate to GetCalculateIfExists
This CL makes it explicit that GetCalculate can return nullptr.
Change-Id: I587e3bb442df3661f083f7058ff02a8d62478ed5
Reviewed-on: https://pdfium-review.googlesource.com/22681
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/cxfa_ffwidgethandler.cpp')
-rw-r--r-- | xfa/fxfa/cxfa_ffwidgethandler.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xfa/fxfa/cxfa_ffwidgethandler.cpp b/xfa/fxfa/cxfa_ffwidgethandler.cpp index 87a013cee2..3a9ff9a316 100644 --- a/xfa/fxfa/cxfa_ffwidgethandler.cpp +++ b/xfa/fxfa/cxfa_ffwidgethandler.cpp @@ -194,7 +194,7 @@ bool CXFA_FFWidgetHandler::HasEvent(CXFA_WidgetAcc* pWidgetAcc, switch (eEventType) { case XFA_EVENT_Calculate: { - CXFA_Calculate* calc = node->GetCalculate(); + CXFA_Calculate* calc = node->GetCalculateIfExists(); return calc && calc->GetScript(); } case XFA_EVENT_Validate: { @@ -229,7 +229,7 @@ int32_t CXFA_FFWidgetHandler::ProcessEvent(CXFA_WidgetAcc* pWidgetAcc, } return XFA_EVENTERROR_Disabled; case XFA_EVENT_InitCalculate: { - CXFA_Calculate* calc = node->GetCalculate(); + CXFA_Calculate* calc = node->GetCalculateIfExists(); if (!calc) return XFA_EVENTERROR_NotExist; if (node->IsUserInteractive()) |