Spice simulator: safety check

This commit is contained in:
Maciej Suminski 2018-03-22 11:58:55 +01:00
parent 5b653c0c1e
commit 058f2bffd0
2 changed files with 5 additions and 1 deletions

View File

@ -207,7 +207,7 @@ bool NGSPICE::LoadNetlist( const string& aNetlist )
m_netlist += std::string( line ) + std::string( "\n" ); m_netlist += std::string( line ) + std::string( "\n" );
} }
lines.push_back( nullptr ); lines.push_back( nullptr ); // sentinel, as requested in ngSpice_Circ description
m_ngSpice_Circ( lines.data() ); m_ngSpice_Circ( lines.data() );
for( auto line : lines ) for( auto line : lines )

View File

@ -87,6 +87,10 @@ public:
case SIM_RUNNING: case SIM_RUNNING:
event = new wxCommandEvent( EVT_SIM_STARTED ); event = new wxCommandEvent( EVT_SIM_STARTED );
break; break;
default:
wxFAIL;
return;
} }
wxQueueEvent( m_parent, event ); wxQueueEvent( m_parent, event );