mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 02:03:12 +02:00
Handle bad init in libgit2
This commit is contained in:
parent
da19b87cb1
commit
3d4afcc051
@ -326,7 +326,19 @@ bool PGM_SINGLE_TOP::OnPgmInit()
|
||||
#endif
|
||||
|
||||
// Initialize the git library before trying to initialize individual programs
|
||||
git_libgit2_init();
|
||||
int gitInit = git_libgit2_init();
|
||||
|
||||
if( gitInit < 0 )
|
||||
{
|
||||
const git_error* err = git_error_last();
|
||||
wxString msg = wxS( "Failed to initialize git library" );
|
||||
|
||||
if( err && err->message )
|
||||
msg += wxS( ": " ) + wxString::FromUTF8( err->message );
|
||||
|
||||
wxLogError( msg );
|
||||
return false;
|
||||
}
|
||||
|
||||
// Not all KiCad applications use the python stuff. skip python init
|
||||
// for these apps.
|
||||
|
Loading…
x
Reference in New Issue
Block a user