Do not pattern-match against the empty net

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13412
This commit is contained in:
Jon Evans 2023-01-06 17:25:27 -05:00
parent 8dc7baad3d
commit 2f7f41b090
1 changed files with 4 additions and 0 deletions

View File

@ -382,6 +382,10 @@ std::shared_ptr<NETCLASS> NET_SETTINGS::GetEffectiveNetClass( const wxString& aN
return ii->second;
};
// <no net> is forced to be part of the Default netclass.
if( aNetName.IsEmpty() )
return m_DefaultNetClass;
auto it = m_NetClassLabelAssignments.find( aNetName );
if( it != m_NetClassLabelAssignments.end() )