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:
@@ -1240,7 +1240,10 @@ void wxMacCoreGraphicsPathData::AddPath( const wxGraphicsPathData* path )
|
|||||||
// closes the current subpath
|
// closes the current subpath
|
||||||
void wxMacCoreGraphicsPathData::CloseSubpath()
|
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
|
// gets the last point of the current path, (0,0) if not yet set
|
||||||
|
Reference in New Issue
Block a user