Browse Source

Add a missing statement in segments reservation.

Also adds an assert in FinishItem.

Fixes https://gitlab.com/kicad/code/kicad/issues/12448
7.0
Alex 3 years ago
committed by Seth Hillbrand
parent
commit
bdf4cf51b8
  1. 1
      common/gal/opengl/opengl_gal.cpp
  2. 2
      common/gal/opengl/vertex_manager.cpp

1
common/gal/opengl/opengl_gal.cpp

@ -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 )

2
common/gal/opengl/vertex_manager.cpp

@ -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();
}

Loading…
Cancel
Save