Eeschema: fix crash when exporting a netlist, if the schematic netlist cannot be built.
It happens when a symbol is not annotated, and if the user closes the opened annotate dialog without making the annotation
This commit is contained in:
parent
dec5d80180
commit
68c2f06074
|
@ -599,6 +599,9 @@ void NETLIST_DIALOG::GenNetlist( wxCommandEvent& event )
|
|||
|
||||
auto netlist = m_Parent->CreateNetlist( false, false );
|
||||
|
||||
if( netlist == nullptr )
|
||||
wxMessageBox( _( "Schematic netlist not available" ) );
|
||||
else
|
||||
m_Parent->WriteNetListFile( netlist, currPage->m_IdNetType,
|
||||
fullpath, netlist_opt, NULL );
|
||||
|
||||
|
|
|
@ -51,6 +51,9 @@ bool SCH_EDIT_FRAME::WriteNetListFile( NETLIST_OBJECT_LIST* aConnectedItemsList,
|
|||
int aFormat, const wxString& aFullFileName,
|
||||
unsigned aNetlistOptions, REPORTER* aReporter )
|
||||
{
|
||||
if( aConnectedItemsList == nullptr ) // Schematic netlist not available.
|
||||
return false;
|
||||
|
||||
bool res = true;
|
||||
bool executeCommandLine = false;
|
||||
|
||||
|
|
Loading…
Reference in New Issue