summaryrefslogtreecommitdiff
path: root/xfa/fxfa
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa')
-rw-r--r--xfa/fxfa/cxfa_ffline.cpp8
-rw-r--r--xfa/fxfa/parser/cxfa_line.cpp2
-rw-r--r--xfa/fxfa/parser/cxfa_line.h2
3 files changed, 6 insertions, 6 deletions
diff --git a/xfa/fxfa/cxfa_ffline.cpp b/xfa/fxfa/cxfa_ffline.cpp
index ee8ca1841a..cdaca4a88f 100644
--- a/xfa/fxfa/cxfa_ffline.cpp
+++ b/xfa/fxfa/cxfa_ffline.cpp
@@ -96,11 +96,11 @@ void CXFA_FFLine::RenderWidget(CXFA_Graphics* pGS,
float fLineWidth = 1.0f;
XFA_AttributeEnum iStrokeType = XFA_AttributeEnum::Unknown;
XFA_AttributeEnum iCap = XFA_AttributeEnum::Unknown;
- CXFA_Edge* edge = line->GetEdge();
- if (edge) {
- if (!edge->IsVisible())
- return;
+ CXFA_Edge* edge = line->GetEdgeIfExists();
+ if (edge && !edge->IsVisible())
+ return;
+ if (edge) {
lineColor = edge->GetColor();
iStrokeType = edge->GetStrokeType();
fLineWidth = edge->GetThickness();
diff --git a/xfa/fxfa/parser/cxfa_line.cpp b/xfa/fxfa/parser/cxfa_line.cpp
index d4159c3f72..4e656c2999 100644
--- a/xfa/fxfa/parser/cxfa_line.cpp
+++ b/xfa/fxfa/parser/cxfa_line.cpp
@@ -50,6 +50,6 @@ bool CXFA_Line::GetSlope() {
return JSObject()->GetEnum(XFA_Attribute::Slope) == XFA_AttributeEnum::Slash;
}
-CXFA_Edge* CXFA_Line::GetEdge() {
+CXFA_Edge* CXFA_Line::GetEdgeIfExists() {
return GetChild<CXFA_Edge>(0, XFA_Element::Edge, false);
}
diff --git a/xfa/fxfa/parser/cxfa_line.h b/xfa/fxfa/parser/cxfa_line.h
index 1b950e4641..18faacd16d 100644
--- a/xfa/fxfa/parser/cxfa_line.h
+++ b/xfa/fxfa/parser/cxfa_line.h
@@ -18,7 +18,7 @@ class CXFA_Line : public CXFA_Node {
XFA_AttributeEnum GetHand();
bool GetSlope();
- CXFA_Edge* GetEdge();
+ CXFA_Edge* GetEdgeIfExists();
};
#endif // XFA_FXFA_PARSER_CXFA_LINE_H_