netlist_exporter_spice: fix crash when re-run the simulator after a schematic change.

Fixes #12142
https://gitlab.com/kicad/code/kicad/issues/12142
This commit is contained in:
jean-pierre charras 2022-08-09 18:33:54 +02:00
parent ba7a06f52e
commit 4f7d7013e0
1 changed files with 4 additions and 3 deletions

View File

@ -97,6 +97,7 @@ bool NETLIST_EXPORTER_SPICE::ReadSchematicAndLibraries( unsigned aNetlistOptions
m_nets.clear();
m_items.clear();
m_libParts.clear();
for( unsigned sheetIndex = 0; sheetIndex < m_schematic->GetSheets().size(); ++sheetIndex )
{