EAGLE import: fix crash when loading unknown signal class name.
Fixes KICAD-3FA Cherry-picked from0fcf9e2c7d
and331176744c
This commit is contained in:
parent
3e1309110e
commit
33c2005c18
|
@ -2594,15 +2594,17 @@ void EAGLE_PLUGIN::loadSignals( wxXmlNode* aSignals )
|
||||||
|
|
||||||
if( net->HasAttribute( "class" ) )
|
if( net->HasAttribute( "class" ) )
|
||||||
{
|
{
|
||||||
netclass = m_classMap[ net->GetAttribute( "class" ) ];
|
auto netclassIt = m_classMap.find( net->GetAttribute( "class" ) );
|
||||||
|
|
||||||
m_board->GetDesignSettings().m_NetSettings->m_NetClassPatternAssignments.push_back(
|
if( netclassIt != m_classMap.end() )
|
||||||
{
|
{
|
||||||
std::make_unique<EDA_COMBINED_MATCHER>( netName, CTX_NETCLASS ),
|
m_board->GetDesignSettings().m_NetSettings->m_NetClassPatternAssignments.push_back(
|
||||||
netclass->GetName()
|
{ std::make_unique<EDA_COMBINED_MATCHER>( netName, CTX_NETCLASS ),
|
||||||
} );
|
netclassIt->second->GetName() } );
|
||||||
|
|
||||||
netInfo->SetNetClass( netclass );
|
netInfo->SetNetClass( netclassIt->second );
|
||||||
|
netclass = netclassIt->second;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_board->Add( netInfo );
|
m_board->Add( netInfo );
|
||||||
|
|
Loading…
Reference in New Issue