summary refs log tree commit diff stats
path: root/commands/account
diff options
context:
space:
mode:
Diffstat (limited to 'commands/account')
-rw-r--r--commands/account/next.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/commands/account/next.go b/commands/account/next.go
index 88c4fd4..3b9260c 100644
--- a/commands/account/next.go
+++ b/commands/account/next.go
@@ -48,10 +48,16 @@ func NextPrevMessage(aerc *widgets.Aerc, args []string) error {
 	}
 	for ; n > 0; n-- {
 		if args[0] == "prev-message" || args[0] == "prev" {
-			acct.Store().Prev()
+			store := acct.Store()
+			if store != nil {
+				store.Prev()
+			}
 			acct.Messages().Scroll()
 		} else {
-			acct.Store().Next()
+			store := acct.Store()
+			if store != nil {
+				store.Next()
+			}
 			acct.Messages().Scroll()
 		}
 	}