Handle uninitialized nets gracefully.
This commit is contained in:
parent
c98621691a
commit
fe1b8c8888
|
@ -1150,7 +1150,12 @@ int BOARD::SortedNetnamesList( wxArrayString& aNames, bool aSortbyPadsCount )
|
|||
padCountListByNet.assign( max_netcode + 1, 0 );
|
||||
|
||||
for( D_PAD* pad : pads )
|
||||
padCountListByNet[pad->GetNetCode()]++;
|
||||
{
|
||||
int netCode = pad->GetNetCode();
|
||||
|
||||
if( netCode >= 0 )
|
||||
padCountListByNet[ netCode ]++;
|
||||
}
|
||||
|
||||
sort( netBuffer.begin(), netBuffer.end(), sortNetsByNodes );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue