mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-24 19:02:39 +08:00
fix: when the remote branch is deleted, deleting the local branch will throw NRE (#238)
This commit is contained in:
@@ -36,7 +36,8 @@ namespace SourceGit.ViewModels
|
||||
if (branch.IsLocal && !string.IsNullOrEmpty(branch.Upstream))
|
||||
{
|
||||
TrackingRemoteBranch = repo.Branches.Find(x => x.FullName == branch.Upstream);
|
||||
DeleteTrackingRemoteTip = new Views.NameHighlightedTextBlock("DeleteBranch.WithTrackingRemote", TrackingRemoteBranch.FriendlyName);
|
||||
if (TrackingRemoteBranch != null)
|
||||
DeleteTrackingRemoteTip = new Views.NameHighlightedTextBlock("DeleteBranch.WithTrackingRemote", TrackingRemoteBranch.FriendlyName);
|
||||
}
|
||||
|
||||
View = new Views.DeleteBranch() { DataContext = this };
|
||||
|
||||
Reference in New Issue
Block a user