Browse Source

Invalid iterator safety.

pull/18/head
Jeff Young 6 months ago
parent
commit
aa77f74c76
  1. 4
      3d-viewer/3d_cache/sg/sg_shape.cpp
  2. 7
      3d-viewer/3d_canvas/create_layer_items.cpp

4
3d-viewer/3d_cache/sg/sg_shape.cpp

@ -752,7 +752,9 @@ bool SGSHAPE::Prepare( const glm::dmat4* aTransform, S3D::MATLIST& materials,
for( unsigned int i = 0; i < nvidx; ++i )
{
mit = indexmap.find( lv[i] );
lvidx[i] = mit->second;
if( mit != indexmap.end() )
lvidx[i] = mit->second;
}
m.m_FaceIdxSize = (unsigned int )nvidx;

7
3d-viewer/3d_canvas/create_layer_items.cpp

@ -797,8 +797,11 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
{
auto mut_it = layer_lock.find( layer );
std::lock_guard< std::mutex > lock( *( mut_it->second ) );
zone->TransformSolidAreasShapesToPolygon( layer, *m_layers_poly[layer] );
if( mut_it != layer_lock.end() )
{
std::lock_guard< std::mutex > lock( *( mut_it->second ) );
zone->TransformSolidAreasShapesToPolygon( layer, *m_layers_poly[layer] );
}
}
}

Loading…
Cancel
Save