From c4aed1d941e4a0b87ad7bb81dfc5416d7fe3bdcc Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 5 Dec 2022 21:36:59 +0300 Subject: [PATCH] Make sure that threads are not running after zone filling. --- pcbnew/zone_filler.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pcbnew/zone_filler.cpp b/pcbnew/zone_filler.cpp index 6430c85d36..157dfb34dc 100644 --- a/pcbnew/zone_filler.cpp +++ b/pcbnew/zone_filler.cpp @@ -417,6 +417,11 @@ bool ZONE_FILLER::Fill( std::vector& aZones, bool aCheck, wxWindow* aPare } } + // Make sure the threads are not running + for( auto& ret : returns ) + if( ret.first.valid() ) + ret.first.wait(); + // Now update the connectivity to check for isolated copper islands // (NB: FindIsolatedCopperIslands() is multi-threaded) //