Fixed a crash when _cvpcb.kiface is not available when opening cvpcb
This commit is contained in:
parent
7aa6f9bd3f
commit
480b1c2592
|
@ -1142,10 +1142,12 @@ void SCH_EDIT_FRAME::OnOpenPcbModuleEditor( wxCommandEvent& event )
|
|||
void SCH_EDIT_FRAME::OnOpenCvpcb( wxCommandEvent& event )
|
||||
{
|
||||
wxFileName fn = Prj().AbsolutePath( g_RootSheet->GetScreen()->GetFileName() );
|
||||
|
||||
fn.SetExt( NetlistFileExtension );
|
||||
|
||||
if( prepareForNetlist() )
|
||||
if( !prepareForNetlist() )
|
||||
return;
|
||||
|
||||
try
|
||||
{
|
||||
KIWAY_PLAYER* player = Kiway().Player( FRAME_CVPCB, false ); // test open already.
|
||||
|
||||
|
@ -1160,6 +1162,10 @@ void SCH_EDIT_FRAME::OnOpenCvpcb( wxCommandEvent& event )
|
|||
|
||||
player->Raise();
|
||||
}
|
||||
catch( const IO_ERROR& e )
|
||||
{
|
||||
DisplayError( this, _( "Could not open CvPcb" ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue