From a66ee7c1d16fe67c903309c45ee1d824d01f5d56 Mon Sep 17 00:00:00 2001 From: leo Date: Fri, 6 Aug 2021 11:19:22 +0800 Subject: [PATCH] fix: fix crash reported by https://gitee.com/sourcegit/sourcegit/issues/I4468X --- src/Views/Widgets/Histories.xaml.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Views/Widgets/Histories.xaml.cs b/src/Views/Widgets/Histories.xaml.cs index 2f5c3f61..370c2cc4 100644 --- a/src/Views/Widgets/Histories.xaml.cs +++ b/src/Views/Widgets/Histories.xaml.cs @@ -32,7 +32,7 @@ namespace SourceGit.Views.Widgets { #region DATA public void NavigateTo(string commit) { - if (string.IsNullOrEmpty(commit)) return; + if (string.IsNullOrEmpty(commit) || commitList == null || commitList.ItemsSource == null) return; foreach (var item in commitList.ItemsSource) { var c = item as Models.Commit;