mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-23 20:47:25 -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) {
|
foreach (var item in commitList.ItemsSource) {
|
||||||
var c = item as Models.Commit;
|
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.SelectedItem = c;
|
||||||
commitList.ScrollIntoView(c);
|
commitList.ScrollIntoView(c);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue