Fix eeschema crash when saving LIB_BEZIER objects
This commit is contained in:
parent
93e8433412
commit
d4fddf1929
|
@ -47,6 +47,7 @@ static inline double sqrt_len( int dx, int dy )
|
|||
|
||||
void BEZIER_POLY::GetPoly( std::vector<wxPoint>& aOutput )
|
||||
{
|
||||
wxCHECK( !m_ctrlPts.empty(), /* void */ );
|
||||
m_output = &aOutput;
|
||||
m_output->clear();
|
||||
m_output->push_back( wxPoint( m_ctrlPts.front() ) );
|
||||
|
|
|
@ -58,10 +58,8 @@ bool LIB_BEZIER::Save( OUTPUTFORMATTER& aFormatter )
|
|||
|
||||
aFormatter.Print( 0, "B %d %d %d %d", ccount, m_Unit, m_Convert, m_Width );
|
||||
|
||||
for( unsigned i = 0; i < GetCornerCount(); i++ )
|
||||
{
|
||||
aFormatter.Print( 0, " %d %d", m_BezierPoints[i].x, m_BezierPoints[i].y );
|
||||
}
|
||||
for( const auto& pt : m_BezierPoints )
|
||||
aFormatter.Print( 0, " %d %d", pt.x, pt.y );
|
||||
|
||||
aFormatter.Print( 0, " %c\n", fill_tab[m_Fill] );
|
||||
|
||||
|
|
Loading…
Reference in New Issue