Fixed closing sub-path of wxGraphicsPath with Direct2D renderer.

Ensure that sub-path being closed contains at least one point.

Closes #17525
This commit is contained in:
Artur Wieczorek 2016-05-08 19:46:04 +02:00
parent fa5f3818b9
commit 43ba49285b

View File

@ -1145,6 +1145,10 @@ void wxD2DPathData::EndFigure(D2D1_FIGURE_END figureEnd)
{
if (m_figureOpened)
{
// Ensure that sub-path being closed contains at least one point.
if( figureEnd == D2D1_FIGURE_END_CLOSED )
m_geometrySink->AddLine(m_currentPoint);
m_geometrySink->EndFigure(figureEnd);
m_figureOpened = false;