diff options
author | Ryooooooga <eial5q265e5@gmail.com> | 2022-05-05 21:41:44 +0900 |
---|---|---|
committer | Ryooooooga <eial5q265e5@gmail.com> | 2022-05-05 21:41:44 +0900 |
commit | 2eb866fc622c76fb30c27f5cfdf66f163f1181e5 (patch) | |
tree | 9e51cc358b6f05ac85658291394be56258ddcf0b /pkg/gui/context/remote_branches_context.go | |
parent | f143d04d87320eda588a35763e4dcb562cc59047 (diff) |
fix: fix a crash when pressing enter in empty commits, reflog, or stash panel
Diffstat (limited to 'pkg/gui/context/remote_branches_context.go')
-rw-r--r-- | pkg/gui/context/remote_branches_context.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pkg/gui/context/remote_branches_context.go b/pkg/gui/context/remote_branches_context.go index affcedf97..d8e9a91bf 100644 --- a/pkg/gui/context/remote_branches_context.go +++ b/pkg/gui/context/remote_branches_context.go @@ -61,5 +61,9 @@ func (self *RemoteBranchesContext) GetSelectedItemId() string { } func (self *RemoteBranchesContext) GetSelectedRef() types.Ref { - return self.GetSelected() + remoteBranch := self.GetSelected() + if remoteBranch == nil { + return nil + } + return remoteBranch } |