diff --git a/eeschema/connection_graph.cpp b/eeschema/connection_graph.cpp index e3741bf336..2489215da8 100644 --- a/eeschema/connection_graph.cpp +++ b/eeschema/connection_graph.cpp @@ -378,6 +378,9 @@ void CONNECTION_SUBGRAPH::UpdateItemConnections() { SCH_CONNECTION* item_conn = item->GetOrInitConnection( m_sheet, m_graph ); + if( !item_conn ) + continue; + if( ( m_driver_connection->IsBus() && item_conn->IsNet() ) || ( m_driver_connection->IsNet() && item_conn->IsBus() ) ) { diff --git a/eeschema/sch_item.h b/eeschema/sch_item.h index 3d181dcdd2..21293338f8 100644 --- a/eeschema/sch_item.h +++ b/eeschema/sch_item.h @@ -26,6 +26,7 @@ #define SCH_ITEM_H #include +#include #include #include @@ -481,7 +482,7 @@ protected: // to store a initial pos of the item or mouse cursor /// Store pointers to other items that are connected to this one, per sheet. - std::unordered_map m_connected_items; + std::map m_connected_items; /// Store connectivity information, per sheet. std::unordered_map m_connection_map; diff --git a/eeschema/sch_sheet_path.h b/eeschema/sch_sheet_path.h index 62a50d490f..d3254be44c 100644 --- a/eeschema/sch_sheet_path.h +++ b/eeschema/sch_sheet_path.h @@ -393,6 +393,14 @@ namespace std }; } +struct SHEET_PATH_CMP +{ + bool operator()( const SCH_SHEET_PATH& lhs, const SCH_SHEET_PATH& rhs ) const + { + return lhs.GetCurrentHash() < rhs.GetCurrentHash(); + } +}; + typedef std::vector< SCH_SHEET_PATH > SCH_SHEET_PATHS; typedef SCH_SHEET_PATHS::iterator SCH_SHEET_PATHS_ITER;