1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-30 03:23:08 +03:00

fix: fix a crash when pressing enter in empty commits, reflog, or stash panel

This commit is contained in:
Ryooooooga
2022-05-05 21:41:44 +09:00
parent f143d04d87
commit 2eb866fc62
7 changed files with 35 additions and 7 deletions

View File

@ -58,5 +58,9 @@ func (self *BranchesContext) GetSelectedItemId() string {
}
func (self *BranchesContext) GetSelectedRef() types.Ref {
return self.GetSelected()
branch := self.GetSelected()
if branch == nil {
return nil
}
return branch
}