Skip to content

Commit a0786bf

Browse files
committed
fix: pulling with empty repository (no local branch) crashes this app (#1020)
Signed-off-by: leo <longshuang@msn.cn>
1 parent 4d740f4 commit a0786bf

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/ViewModels/Repository.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -663,6 +663,12 @@ public void Pull(bool autoStart)
663663
return;
664664
}
665665

666+
if (_currentBranch == null)
667+
{
668+
App.RaiseException(_fullpath, "Can NOT found current branch!!!");
669+
return;
670+
}
671+
666672
var pull = new Pull(this, null);
667673
if (autoStart && pull.SelectedBranch != null)
668674
ShowAndStartPopup(pull);

0 commit comments

Comments
 (0)