diff --git a/common/git/git_pull_handler.cpp b/common/git/git_pull_handler.cpp index 01e222d125..a696008815 100644 --- a/common/git/git_pull_handler.cpp +++ b/common/git/git_pull_handler.cpp @@ -39,7 +39,10 @@ GIT_PULL_HANDLER::~GIT_PULL_HANDLER() bool GIT_PULL_HANDLER::PerformFetch() { - // Fetch updates from remote repository + if( !m_repo ) + return false; + + // Fetch updates from remote repository git_remote* remote = nullptr; if( git_remote_lookup( &remote, m_repo, "origin" ) != 0 ) diff --git a/kicad/project_tree_pane.cpp b/kicad/project_tree_pane.cpp index f903339337..d6ee74dd25 100644 --- a/kicad/project_tree_pane.cpp +++ b/kicad/project_tree_pane.cpp @@ -2623,7 +2623,7 @@ void PROJECT_TREE_PANE::onGitSyncTimer( wxTimerEvent& aEvent ) { KIGIT_COMMON* gitCommon = m_TreeProject->GitCommon(); - if( !gitCommon || !gitCommon->GetRepo() ) + if( !gitCommon ) return; GIT_PULL_HANDLER handler( gitCommon );