aboutsummaryrefslogtreecommitdiffstats
path: root/commands/account/view.go
diff options
context:
space:
mode:
Diffstat (limited to 'commands/account/view.go')
-rw-r--r--commands/account/view.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/commands/account/view.go b/commands/account/view.go
index 4f59d947..53ad2678 100644
--- a/commands/account/view.go
+++ b/commands/account/view.go
@@ -26,6 +26,9 @@ func (ViewMessage) Execute(aerc *widgets.Aerc, args []string) error {
return errors.New("Usage: view-message")
}
acct := aerc.SelectedAccount()
+ if acct == nil {
+ return errors.New("No account selected")
+ }
if acct.Messages().Empty() {
return nil
}