diff --git a/pkg/gui/controllers/helpers/refresh_helper.go b/pkg/gui/controllers/helpers/refresh_helper.go index a8f32d116..04b741b56 100644 --- a/pkg/gui/controllers/helpers/refresh_helper.go +++ b/pkg/gui/controllers/helpers/refresh_helper.go @@ -274,7 +274,7 @@ func (self *RefreshHelper) refreshCommitsAndCommitFiles() { // or perhaps we could just pop that context off the stack whenever cycling windows. // For now the awkwardness remains. commit := self.c.Contexts().LocalCommits.GetSelected() - if commit != nil { + if commit != nil && commit.RefName() != "" { self.c.Contexts().CommitFiles.SetRef(commit) self.c.Contexts().CommitFiles.SetTitleRef(commit.RefName()) _ = self.refreshCommitFilesContext()