Protect against invalid HOME variable
Fixes https://gitlab.com/kicad/code/kicad/issues/6990
This commit is contained in:
parent
c3d46c1cb5
commit
1e4d81e3c4
|
@ -215,6 +215,14 @@ bool PGM_BASE::InitPgm()
|
||||||
|
|
||||||
wxInitAllImageHandlers();
|
wxInitAllImageHandlers();
|
||||||
|
|
||||||
|
#ifndef __WINDOWS__
|
||||||
|
if( wxString( wxGetenv( "HOME" ) ).IsEmpty() )
|
||||||
|
{
|
||||||
|
DisplayErrorMessage( nullptr, _( "Environmental variable HOME is empty. Unable to continue." ) );
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
m_pgm_checker = new wxSingleInstanceChecker( pgm_name.GetName().Lower() + wxT( "-" ) +
|
m_pgm_checker = new wxSingleInstanceChecker( pgm_name.GetName().Lower() + wxT( "-" ) +
|
||||||
wxGetUserId(), GetKicadLockFilePath() );
|
wxGetUserId(), GetKicadLockFilePath() );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue