From a82943d6496b7051bfbf47f18238f5b5ace38ae4 Mon Sep 17 00:00:00 2001 From: leo Date: Wed, 15 Jul 2020 15:35:49 +0800 Subject: [PATCH] Fix crash due to missing name in file system changed event when running git command background without SourceGit --- SourceGit/Git/Repository.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SourceGit/Git/Repository.cs b/SourceGit/Git/Repository.cs index b5849d61..46db6447 100644 --- a/SourceGit/Git/Repository.cs +++ b/SourceGit/Git/Repository.cs @@ -361,6 +361,8 @@ namespace SourceGit.Git { } private void OnFSChanged(object sender, FileSystemEventArgs e) { + if (string.IsNullOrEmpty(e.Name)) return; + if (e.Name.StartsWith(".git", StringComparison.Ordinal)) { if (e.Name.Equals(".git") || e.Name.StartsWith(".git\\index")) return;