diff options
Diffstat (limited to 'fpdfsdk/fpdfeditpath.cpp')
-rw-r--r-- | fpdfsdk/fpdfeditpath.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/fpdfsdk/fpdfeditpath.cpp b/fpdfsdk/fpdfeditpath.cpp index f6e103c047..63a887dc85 100644 --- a/fpdfsdk/fpdfeditpath.cpp +++ b/fpdfsdk/fpdfeditpath.cpp @@ -106,15 +106,10 @@ DLLEXPORT FPDF_BOOL FPDFPath_Close(FPDF_PAGEOBJECT path) { return false; auto pPathObj = reinterpret_cast<CPDF_PathObject*>(path); - int numPoints = pPathObj->m_Path.GetPointCount(); - if (numPoints == 0) + if (pPathObj->m_Path.GetPoints().empty()) return false; - FX_PATHPOINT* pPoints = pPathObj->m_Path.GetMutablePoints(); - if (pPoints[numPoints - 1].m_CloseFigure) - return true; - - pPoints[numPoints - 1].m_CloseFigure = true; + pPathObj->m_Path.ClosePath(); return true; } |