Browse Source

Invalid iterator safety.

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

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

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

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

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

Loading…
Cancel
Save