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

@ -84,7 +84,11 @@ func (self *LocalCommitsContext) CanRebase() bool {
}
func (self *LocalCommitsContext) GetSelectedRef() types.Ref {
return self.GetSelected()
commit := self.GetSelected()
if commit == nil {
return nil
}
return commit
}
func (self *LocalCommitsViewModel) SetLimitCommits(value bool) {