summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_ffpushbutton.cpp
diff options
context:
space:
mode:
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;
}