Add a missing statement in segments reservation.

Also adds an assert in FinishItem.

Fixes https://gitlab.com/kicad/code/kicad/issues/12448
This commit is contained in:
Alex 2022-09-17 21:16:10 +03:00 committed by Seth Hillbrand
parent 4d3804aad4
commit bdf4cf51b8
2 changed files with 3 additions and 0 deletions

View File

@ -2228,6 +2228,7 @@ void OPENGL_GAL::drawSegmentChain( const std::function<VECTOR2D( int )>& aPointG
if( startx == endx || starty == endy )
{
vertices += 3; // One circle
continue;
}
if( m_isFillEnabled || aWidth == 1.0 )

View File

@ -167,6 +167,8 @@ void VERTEX_MANAGER::SetItem( VERTEX_ITEM& aItem ) const
void VERTEX_MANAGER::FinishItem() const
{
assert( m_reservedSpace == 0 && m_reserved == nullptr );
m_container->FinishItem();
}