From 927b633c014116c8e33705328407a1c99e4cd1d7 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Fri, 22 Oct 2021 16:49:34 -0700 Subject: [PATCH] Make sure spice command doesn't assert Fixes https://gitlab.com/kicad/code/kicad/issues/4328 --- eeschema/dialogs/dialog_netlist.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/eeschema/dialogs/dialog_netlist.cpp b/eeschema/dialogs/dialog_netlist.cpp index 82e348923b..b837e4d1f3 100644 --- a/eeschema/dialogs/dialog_netlist.cpp +++ b/eeschema/dialogs/dialog_netlist.cpp @@ -300,7 +300,10 @@ void NETLIST_DIALOG::OnRunExternSpiceCommand( wxCommandEvent& event ) if( m_Parent->ReadyToNetlist( _( "Simulator requires a fully annotated schematic." ) ) ) { m_Parent->WriteNetListFile( NET_TYPE_SPICE, fn.GetFullPath(), netlist_opt, nullptr ); - wxExecute( commandLine, wxEXEC_ASYNC ); + commandLine.Trim( true ).Trim( false ); + + if( !commandLine.IsEmpty() ) + wxExecute( commandLine, wxEXEC_ASYNC ); } }