Make sure there is a filename before creating a parameter for it.

Fixes https://gitlab.com/kicad/code/kicad/issues/9263
This commit is contained in:
Jeff Young 2021-09-27 22:56:36 +01:00
parent 7089a837f6
commit 3413358992
1 changed files with 4 additions and 2 deletions

View File

@ -139,10 +139,12 @@ int ExecuteFile( const wxString& aEditorName, const wxString& aFileName, wxProce
if( !param.IsEmpty() )
args[i++] = param.wc_str();
args[i++] = aFileName.wc_str();
if( !aFileName.IsEmpty() )
args[i++] = aFileName.wc_str();
args[i] = nullptr;
return wxExecute( const_cast<wchar_t**>( args ), wxEXEC_ASYNC, aCallback );
return wxExecute( const_cast< wchar_t**>( args ), wxEXEC_ASYNC, aCallback );
}
wxString msg;