Don't allow ZONE_FILLER::Fill to run more than once at a time

This commit is contained in:
Jon Evans 2018-02-22 22:29:46 -05:00 committed by Wayne Stambaugh
parent d043ef5bb6
commit 8c1847f7ab
1 changed files with 2 additions and 1 deletions

View File

@ -84,7 +84,8 @@ void ZONE_FILLER::Fill( std::vector<ZONE_CONTAINER*> aZones )
std::vector<CN_ZONE_ISOLATED_ISLAND_LIST> toFill;
auto connectivity = m_board->GetConnectivity();
connectivity->Lock();
if( !connectivity->TryLock() )
return;
// Remove segment zones
m_board->m_Zone.DeleteAll();