aboutsummaryrefslogtreecommitdiff
path: root/commands/next-message.go
diff options
context:
space:
mode:
Diffstat (limited to 'commands/next-message.go')
-rw-r--r--commands/next-message.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/commands/next-message.go b/commands/next-message.go
index 8639973..d1d188c 100644
--- a/commands/next-message.go
+++ b/commands/next-message.go
@@ -38,6 +38,9 @@ func NextPrevMessage(aerc *widgets.Aerc, args []string) error {
}
}
acct := aerc.SelectedAccount()
+ if acct == nil {
+ return errors.New("No account selected")
+ }
if pct {
n = int(float64(acct.Messages().Height()) * (float64(n) / 100.0))
}