Commit 7161c5bd authored by Kirill Mavreshko's avatar Kirill Mavreshko Committed by Maciej Suminski

bugfix: pcbnew crashes when you try to save a file

parent 3f8f6caf
......@@ -63,12 +63,14 @@ static const wxString traceFootprintLibrary( wxT( "KicadFootprintLib" ) );
///> Removes empty nets (i.e. with node count equal zero) from net classes
void filterNetClass( const BOARD& aBoard, NETCLASS& aNetClass )
{
for( NETCLASS::const_iterator it = aNetClass.begin(); it != aNetClass.end(); ++it )
for( NETCLASS::const_iterator it = aNetClass.begin(); it != aNetClass.end(); )
{
NETINFO_ITEM* netinfo = aBoard.FindNet( *it );
if( netinfo && netinfo->GetNodesCount() <= 0 ) // hopefully there are no nets with negative
aNetClass.Remove( it ); // node count, but you never know..
aNetClass.Remove( it++ ); // node count, but you never know..
else
++it;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment