7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-18 19:39:17 +00:00

Guard against multi-threaded access to connectivity rebuild

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19884
This commit is contained in:
Jon Evans 2025-02-08 20:27:26 -05:00
parent 7bf40b82d0
commit f047b66cb8
2 changed files with 3 additions and 0 deletions

View File

@ -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

View File

@ -298,6 +298,8 @@ private:
bool m_isLocal;
std::shared_ptr<CONNECTIVITY_DATA> m_globalConnectivityData;
std::mutex m_mutex;
PROGRESS_REPORTER* m_progressReporter = nullptr;
};