From 24dfd62fc08be88bd192841330a51494993dff4d Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Sun, 8 May 2016 19:26:02 +0200 Subject: [PATCH] Fixed closing sub-path of wxGraphicsPath with GDI+ renderer. Ensure that sub-path being closed contains at least one point. See #17525. --- src/msw/graphics.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/msw/graphics.cpp b/src/msw/graphics.cpp index 1dae1e7737..79a0dde0ed 100644 --- a/src/msw/graphics.cpp +++ b/src/msw/graphics.cpp @@ -1236,6 +1236,9 @@ void wxGDIPlusPathData::CloseSubpath() { if( m_figureOpened ) { + // Ensure that sub-path being closed contains at least one point. + m_path->AddLine(m_logCurrentPoint, m_logCurrentPoint); + m_path->CloseFigure(); m_figureOpened = false; // Since native GDI+ renderer doesn't move its current point