From 49a634e63fd785a059e4da72f83cf40f2531d3a0 Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Thu, 12 May 2016 21:18:23 +0200 Subject: [PATCH] Fixed closing sub-path of wxGraphicsPath with GDI+ renderer. Add additional point to the sub-path being closed only if this sub-path is empty (its native current point is not set). --- src/msw/graphics.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/msw/graphics.cpp b/src/msw/graphics.cpp index 776da5b5c6..579782467c 100644 --- a/src/msw/graphics.cpp +++ b/src/msw/graphics.cpp @@ -1237,7 +1237,8 @@ void wxGDIPlusPathData::CloseSubpath() if( m_figureOpened ) { // Ensure that sub-path being closed contains at least one point. - m_path->AddLine(m_logCurrentPoint, m_logCurrentPoint); + if ( m_logCurrentPointSet ) + m_path->AddLine(m_logCurrentPoint, m_logCurrentPoint); m_path->CloseFigure(); m_figureOpened = false;