From 9e28a02f6a4345ec7b5fdee68864610186f34e91 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Sun, 17 Mar 2019 14:57:05 -0400 Subject: commands: handle case where no account selected --- commands/select-message.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'commands/select-message.go') diff --git a/commands/select-message.go b/commands/select-message.go index 868d1fd9..728d31ba 100644 --- a/commands/select-message.go +++ b/commands/select-message.go @@ -26,6 +26,9 @@ func SelectMessage(aerc *widgets.Aerc, args []string) error { } } acct := aerc.SelectedAccount() + if acct == nil { + return errors.New("No account selected") + } acct.Messages().Select(n) return nil } -- cgit