mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-23 20:47:25 -08:00
fix: when the remote branch is deleted, deleting the local branch will throw NRE (#238)
This commit is contained in:
parent
15e7df6085
commit
3ce580b682
1 changed files with 2 additions and 1 deletions
|
@ -36,7 +36,8 @@ namespace SourceGit.ViewModels
|
||||||
if (branch.IsLocal && !string.IsNullOrEmpty(branch.Upstream))
|
if (branch.IsLocal && !string.IsNullOrEmpty(branch.Upstream))
|
||||||
{
|
{
|
||||||
TrackingRemoteBranch = repo.Branches.Find(x => x.FullName == 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 };
|
View = new Views.DeleteBranch() { DataContext = this };
|
||||||
|
|
Loading…
Reference in a new issue