mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 02:03:12 +02:00
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…
x
Reference in New Issue
Block a user