Guard against multi-threaded access to connectivity rebuild
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19884
This commit is contained in:
@@ -228,6 +228,7 @@ void CN_CONNECTIVITY_ALGO::RemoveInvalidRefs()
|
||||
|
||||
void CN_CONNECTIVITY_ALGO::searchConnections()
|
||||
{
|
||||
std::lock_guard lock( m_mutex );
|
||||
#ifdef PROFILE
|
||||
PROF_TIMER garbage_collection( "garbage-collection" );
|
||||
#endif
|
||||
|
||||
@@ -298,6 +298,8 @@ private:
|
||||
bool m_isLocal;
|
||||
std::shared_ptr<CONNECTIVITY_DATA> m_globalConnectivityData;
|
||||
|
||||
std::mutex m_mutex;
|
||||
|
||||
PROGRESS_REPORTER* m_progressReporter = nullptr;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user