From 7ec21e2e533997bdd4a11128d03811ef9e255243 Mon Sep 17 00:00:00 2001 From: "DESKTOP-L3MJ80L\\hamme" Date: Wed, 29 May 2024 21:31:46 +0800 Subject: [PATCH] Fix the crash caused by pushing without a branch --- src/ViewModels/Repository.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ViewModels/Repository.cs b/src/ViewModels/Repository.cs index 93f29c2a..e0fda542 100644 --- a/src/ViewModels/Repository.cs +++ b/src/ViewModels/Repository.cs @@ -385,7 +385,10 @@ namespace SourceGit.ViewModels } if (Branches.Find(x => x.IsCurrent) == null) + { App.RaiseException(_fullpath, "Can NOT found current branch!!!"); + return; + } PopupHost.ShowPopup(new Push(this, null)); }