SHAPE_LINE_CHAIN: Don't crash if inserting point at the end
This commit is contained in:
parent
bd6539885b
commit
5bc1e55272
|
@ -631,7 +631,7 @@ void SHAPE_LINE_CHAIN::Append( const SHAPE_ARC& aArc )
|
||||||
|
|
||||||
void SHAPE_LINE_CHAIN::Insert( size_t aVertex, const VECTOR2I& aP )
|
void SHAPE_LINE_CHAIN::Insert( size_t aVertex, const VECTOR2I& aP )
|
||||||
{
|
{
|
||||||
if( m_shapes[aVertex] != SHAPE_IS_PT )
|
if( aVertex < m_points.size() && m_shapes[aVertex] != SHAPE_IS_PT )
|
||||||
convertArc( aVertex );
|
convertArc( aVertex );
|
||||||
|
|
||||||
m_points.insert( m_points.begin() + aVertex, aP );
|
m_points.insert( m_points.begin() + aVertex, aP );
|
||||||
|
|
Loading…
Reference in New Issue