mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-24 20:57:19 -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,6 +36,7 @@ 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);
|
||||||
|
if (TrackingRemoteBranch != null)
|
||||||
DeleteTrackingRemoteTip = new Views.NameHighlightedTextBlock("DeleteBranch.WithTrackingRemote", TrackingRemoteBranch.FriendlyName);
|
DeleteTrackingRemoteTip = new Views.NameHighlightedTextBlock("DeleteBranch.WithTrackingRemote", TrackingRemoteBranch.FriendlyName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue