3D viewer: Fix hanging when a board is displayed in non realistic mode and the body is not shown.

This commit is contained in:
jean-pierre charras 2018-11-26 15:58:54 +01:00
parent a3b82d770e
commit 90139d540c
2 changed files with 3 additions and 7 deletions

View File

@ -615,11 +615,9 @@ void C3D_RENDER_OGL_LEGACY::reload( REPORTER *aStatusTextReporter )
{
const SHAPE_POLY_SET *polyList = map_poly.at( layer_id );
layerTriangles->AddToMiddleContourns( *polyList,
layer_z_bot,
layer_z_top,
m_settings.BiuTo3Dunits(),
false );
if( polyList->OutlineCount() > 0 )
layerTriangles->AddToMiddleContourns( *polyList, layer_z_bot, layer_z_top,
m_settings.BiuTo3Dunits(), false );
}
// Create display list

View File

@ -282,8 +282,6 @@ void CLAYER_TRIANGLES::AddToMiddleContourns( const SHAPE_POLY_SET &aPolySet,
double aBiuTo3Du,
bool aInvertFaceDirection )
{
wxASSERT( aPolySet.OutlineCount() > 0 );
if( aPolySet.OutlineCount() == 0 )
return;