Merge pull request #153 from Hammerliu/fix_crash

Fix the crash caused by pushing without a branch
This commit is contained in:
leo 2024-05-29 22:05:37 +08:00 committed by GitHub
commit f4d379e3b8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -385,7 +385,10 @@ namespace SourceGit.ViewModels
} }
if (Branches.Find(x => x.IsCurrent) == null) if (Branches.Find(x => x.IsCurrent) == null)
{
App.RaiseException(_fullpath, "Can NOT found current branch!!!"); App.RaiseException(_fullpath, "Can NOT found current branch!!!");
return;
}
PopupHost.ShowPopup(new Push(this, null)); PopupHost.ShowPopup(new Push(this, null));
} }