Fix closing empty subpath (Core Graphics)

CGPathCloseSubpath() shouldn't be invoked if the path is empty to suppress harmless warning displayed on console.
This commit is contained in:
Artur Wieczorek
2018-07-28 14:18:04 +02:00
parent 3f18576dee
commit 52d0462aa5

View File

@@ -1240,7 +1240,10 @@ void wxMacCoreGraphicsPathData::AddPath( const wxGraphicsPathData* path )
// closes the current subpath
void wxMacCoreGraphicsPathData::CloseSubpath()
{
CGPathCloseSubpath( m_path );
if ( !CGPathIsEmpty(m_path) )
{
CGPathCloseSubpath( m_path );
}
}
// gets the last point of the current path, (0,0) if not yet set