summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_ffpushbutton.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2018-01-11 16:35:12 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-01-11 16:35:12 +0000
commitce7df754b0608887a923d5083f0bbb999a735fce (patch)
tree03c73474e98e7832eb6601e5933707f3ec087653 /xfa/fxfa/cxfa_ffpushbutton.cpp
parentb800d149de09ac7d73aa3d1ff8558e33a4c56009 (diff)
downloadpdfium-ce7df754b0608887a923d5083f0bbb999a735fce.tar.xz
Rename CXFA_Box methods to make return clearer
This CL renames the methods in CXFA_Box to make it clearer they can return nullptr. Change-Id: I521c0e06af306f69e390a4057cabb7777a0d72f5 Reviewed-on: https://pdfium-review.googlesource.com/22740 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/cxfa_ffpushbutton.cpp')
-rw-r--r--xfa/fxfa/cxfa_ffpushbutton.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/xfa/fxfa/cxfa_ffpushbutton.cpp b/xfa/fxfa/cxfa_ffpushbutton.cpp
index 779fada905..85805b4d76 100644
--- a/xfa/fxfa/cxfa_ffpushbutton.cpp
+++ b/xfa/fxfa/cxfa_ffpushbutton.cpp
@@ -121,8 +121,10 @@ bool CXFA_FFPushButton::PerformLayout() {
float CXFA_FFPushButton::GetLineWidth() {
CXFA_Border* border = m_pNode->GetBorderIfExists();
- if (border && border->GetPresence() == XFA_AttributeEnum::Visible)
- return border->GetEdge(0)->GetThickness();
+ if (border && border->GetPresence() == XFA_AttributeEnum::Visible) {
+ CXFA_Edge* edge = border->GetEdgeIfExists(0);
+ return edge ? edge->GetThickness() : 0;
+ }
return 0;
}