Gerbview: fix a crash when Gerbview starts by loading a gerber job file (run from a command line)

This commit is contained in:
jean-pierre charras 2018-05-07 12:47:11 +02:00
parent d35a6f1e6d
commit a3770bf6e1
1 changed files with 6 additions and 0 deletions

View File

@ -303,6 +303,12 @@ void GERBVIEW_FRAME::OnCloseWindow( wxCloseEvent& Event )
bool GERBVIEW_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, int aCtl )
{
// Ensure the frame is shown when opening the file(s), to avoid issues (crash) on GAL
// when trying to change the view if it is not fully initialized.
// It happens when starting Gerbview with a gerber job file to load
if( !IsShown() )
Show();
// The current project path is also a valid command parameter. Check if a single path
// rather than a file name was passed to GerbView and use it as the initial MRU path.
if( aFileSet.size() > 0 )