mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-11 00:30:01 +00:00
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 )
|
||||
{
|
||||
if( m_shapes[aVertex] != SHAPE_IS_PT )
|
||||
if( aVertex < m_points.size() && m_shapes[aVertex] != SHAPE_IS_PT )
|
||||
convertArc( aVertex );
|
||||
|
||||
m_points.insert( m_points.begin() + aVertex, aP );
|
||||
|
Loading…
Reference in New Issue
Block a user