diff options
Diffstat (limited to 'commands/msgview')
-rw-r--r-- | commands/msgview/next.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/commands/msgview/next.go b/commands/msgview/next.go index 4291a6a5..742bc665 100644 --- a/commands/msgview/next.go +++ b/commands/msgview/next.go @@ -1,6 +1,8 @@ package msgview import ( + "errors" + "git.sr.ht/~rjarry/aerc/commands/account" "git.sr.ht/~rjarry/aerc/lib" "git.sr.ht/~rjarry/aerc/widgets" @@ -27,6 +29,9 @@ func (NextPrevMsg) Execute(aerc *widgets.Aerc, args []string) error { } mv, _ := aerc.SelectedTab().(*widgets.MessageViewer) acct := mv.SelectedAccount() + if acct == nil { + return errors.New("No account selected") + } store := mv.Store() err = account.ExecuteNextPrevMessage(args, acct, pct, n) if err != nil { |