3D-Viewer: skip layers not created
Fixes https://gitlab.com/kicad/code/kicad/issues/6324
This commit is contained in:
parent
4ea3914d4e
commit
a9be08e1ce
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue