3D-Viewer: mark flag as initialized

Fixes https://gitlab.com/kicad/code/kicad/issues/6331
This commit is contained in:
Mario Luzeiro 2020-11-09 13:19:12 +00:00
parent 4889f9bb7c
commit 82bd232737
2 changed files with 2 additions and 2 deletions

View File

@ -224,7 +224,6 @@ void CLAYER_TRIANGLES::AddToMiddleContourns( const std::vector< SFVEC2F > &aCont
if( aThroughHoles && aThroughHoles->IntersectAny( RAYSEG2D( v0, v1 ) ) )
continue;
else
//if( aThroughHoles && aThroughHoles->IntersectAny( RAYSEG2D( v0, v1 ) ) )
{
std::lock_guard<std::mutex> lock( m_middle_layer_lock );
m_layer_middle_contourns_quads->AddQuad( SFVEC3F( v0.x, v0.y, zTop ),

View File

@ -276,12 +276,13 @@ void CBVHCONTAINER2D::BuildBVH()
if( m_isInitialized )
destroy();
m_isInitialized = true;
if( m_objects.empty() )
{
return;
}
m_isInitialized = true;
m_Tree = new BVH_CONTAINER_NODE_2D;
m_elements_to_delete.push_back( m_Tree );