NETLIST_EXPORTER_PSPICE skips removed pins when processing a list of sorted pins.

NETLIST_EXPORTER marks removed duplicates by setting them to NULL in m_SortedComponentPinList vector.
This commit is contained in:
Maciej Suminski 2016-08-19 17:32:30 +02:00
parent ea59ce40e1
commit e1d20dd6e3
2 changed files with 6 additions and 2 deletions

View File

@ -223,7 +223,7 @@ SCH_COMPONENT* NETLIST_EXPORTER::findNextComponentAndCreatePinList( EDA_ITEM*
m_SortedComponentPinList.end(), sortPinsByNum );
// Remove duplicate Pins in m_SortedComponentPinList
eraseDuplicatePins( );
eraseDuplicatePins();
// record the usage of this library component entry.
m_LibParts.insert( part ); // rejects non-unique pointers

View File

@ -310,7 +310,11 @@ bool NETLIST_EXPORTER_PSPICE::ProcessNetlist( unsigned aCtl )
for( unsigned ii = 0; ii < m_SortedComponentPinList.size(); ii++ )
{
NETLIST_OBJECT* pin = m_SortedComponentPinList[ii];
assert( pin );
// NETLIST_EXPORTER marks removed pins by setting them to NULL
if( !pin )
continue;
spiceItem.m_pins.push_back( pin );
pinNames.Add( pin->GetPinNumText() );