termui: fix bug when trying to edit without selection

This commit is contained in:
ludovicm67 2019-04-10 23:53:10 +02:00
parent 0e53d2555e
commit ff686e6d5b
No known key found for this signature in database
GPG Key ID: 4BAA8E8D43E08DB1

View File

@ -639,6 +639,10 @@ func (sb *showBug) edit(g *gocui.Gui, v *gocui.View) error {
return sb.editLabels(g, snap) return sb.editLabels(g, snap)
} }
if sb.selected == "" {
return nil
}
op, err := snap.SearchTimelineItem(git.Hash(sb.selected)) op, err := snap.SearchTimelineItem(git.Hash(sb.selected))
if err != nil { if err != nil {
return err return err