3D-Viewer: skip layers not created

Fixes https://gitlab.com/kicad/code/kicad/issues/6324
This commit is contained in:
Mario Luzeiro 2020-11-09 22:22:36 +00:00 committed by Wayne Stambaugh
parent 4ea3914d4e
commit a9be08e1ce
1 changed files with 4 additions and 5 deletions

View File

@ -628,12 +628,11 @@ void C3D_RENDER_OGL_LEGACY::reload( REPORTER* aStatusReporter, REPORTER* aWarnin
const CBVHCONTAINER2D *container2d = static_cast<const CBVHCONTAINER2D *>(ii->second);
// Load the vertical (Z axis) component of shapes
const SHAPE_POLY_SET *aPolyList = nullptr;
if( map_poly.find( layer_id ) != map_poly.end() )
{
aPolyList = map_poly.at( layer_id );
}
if( map_poly.find( layer_id ) == map_poly.end() )
continue;
const SHAPE_POLY_SET *aPolyList = map_poly.at( layer_id );
SHAPE_POLY_SET polyListSubtracted;
polyListSubtracted = *aPolyList;