diff options
author | Drew DeVault <sir@cmpwn.com> | 2019-03-17 14:57:05 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-03-17 14:57:05 -0400 |
commit | 9e28a02f6a4345ec7b5fdee68864610186f34e91 (patch) | |
tree | 866940888523f3cafa649697d088c4e016014662 /commands/next-folder.go | |
parent | bd71787e3fa9caf53f18dab37c4f37a2631b2354 (diff) | |
download | aerc-9e28a02f6a4345ec7b5fdee68864610186f34e91.tar.gz |
commands: handle case where no account selected
Diffstat (limited to 'commands/next-folder.go')
-rw-r--r-- | commands/next-folder.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/commands/next-folder.go b/commands/next-folder.go index dce89075..f0332c6f 100644 --- a/commands/next-folder.go +++ b/commands/next-folder.go @@ -32,6 +32,9 @@ func NextPrevFolder(aerc *widgets.Aerc, args []string) error { } } acct := aerc.SelectedAccount() + if acct == nil { + return errors.New("No account selected") + } for ; n > 0; n-- { if args[0] == "prev-folder" { acct.Directories().Prev() |