diff --git a/common/kiway.cpp b/common/kiway.cpp index f567ae8c88..a0f06e7c44 100644 --- a/common/kiway.cpp +++ b/common/kiway.cpp @@ -382,6 +382,10 @@ KIWAY_PLAYER* KIWAY::Player( FRAME_T aFrameType, bool doCreate, wxTopLevelWindow { DisplayErrorMessage( NULL, _( "Error loading editor" ), ioe.What() ); } + catch ( const std::exception& e) + { + DisplayErrorMessage( NULL, _( "Error loading editor" ), e.what() ); + } catch( ... ) { DisplayErrorMessage( NULL, _( "Error loading editor" ) ); diff --git a/kicad/tools/kicad_manager_control.cpp b/kicad/tools/kicad_manager_control.cpp index becd95253b..fe0e00201a 100644 --- a/kicad/tools/kicad_manager_control.cpp +++ b/kicad/tools/kicad_manager_control.cpp @@ -603,6 +603,13 @@ int KICAD_MANAGER_CONTROL::ShowPlayer( const TOOL_EVENT& aEvent ) return -1; } + if ( !player ) + { + wxMessageBox( _( "Application failed to load." ), _( "KiCad Error" ), + wxOK | wxICON_ERROR, m_frame ); + return -1; + } + if( !player->IsVisible() ) // A hidden frame might not have the document loaded. { wxString filepath;