From 54e4ccbbf09c496f8ab79a2b02fc4afc3d6abc42 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Tue, 16 Jan 2018 15:46:35 +0000 Subject: Rename CXFA_Line methods to make clearer This CL clarifies that he CXFA_Line::GetEdge method can return nullptr. Change-Id: I785d4636126727e07a80afb001489bd00ec9ae9e Reviewed-on: https://pdfium-review.googlesource.com/22771 Commit-Queue: dsinclair Reviewed-by: Ryan Harrison --- xfa/fxfa/cxfa_ffline.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'xfa/fxfa/cxfa_ffline.cpp') 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(); -- cgit v1.2.3