mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-22 20:37:19 -08:00
fix<Histories>: fix crash reported by https://gitee.com/sourcegit/sourcegit/issues/I43Y33
This commit is contained in:
parent
8894705321
commit
da1abaee16
1 changed files with 1 additions and 1 deletions
|
@ -36,7 +36,7 @@ namespace SourceGit.Views.Widgets {
|
|||
|
||||
foreach (var item in commitList.ItemsSource) {
|
||||
var c = item as Models.Commit;
|
||||
if (c.SHA.StartsWith(commit, StringComparison.Ordinal)) {
|
||||
if (c != null && c.SHA.StartsWith(commit, StringComparison.Ordinal)) {
|
||||
commitList.SelectedItem = c;
|
||||
commitList.ScrollIntoView(c);
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue