diff --git a/eeschema/sch_pin.cpp b/eeschema/sch_pin.cpp index d85a48ee5d..301b11f4f9 100644 --- a/eeschema/sch_pin.cpp +++ b/eeschema/sch_pin.cpp @@ -67,6 +67,8 @@ wxString SCH_PIN::GetDefaultNetName( const SCH_SHEET_PATH aPath ) if( m_pin->IsPowerConnection() ) return m_pin->GetName(); + std::lock_guard lock( m_netmap_mutex ); + if( m_net_name_map.count( aPath ) > 0 ) return m_net_name_map.at( aPath ); diff --git a/eeschema/sch_pin.h b/eeschema/sch_pin.h index d879444d38..d2a976db97 100644 --- a/eeschema/sch_pin.h +++ b/eeschema/sch_pin.h @@ -26,6 +26,9 @@ #include #include +#include +#include + class SCH_COMPONENT; class SCH_PIN : public SCH_ITEM @@ -37,6 +40,7 @@ class SCH_PIN : public SCH_ITEM bool m_isDangling; /// The name that this pin connection will drive onto a net + std::mutex m_netmap_mutex; std::map m_net_name_map; public: