From 8bb115dbae928111be52ed422dafb1caf72a744c Mon Sep 17 00:00:00 2001 From: Kevin Kuehler Date: Sun, 14 Jul 2019 00:42:24 -0700 Subject: commands: Don't crash when store is nil On a slow network connection, running these commands without this guard will cause aerc to panic. Signed-off-by: Kevin Kuehler --- commands/msg/pipe.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'commands/msg/pipe.go') diff --git a/commands/msg/pipe.go b/commands/msg/pipe.go index 821f359..77e5d96 100644 --- a/commands/msg/pipe.go +++ b/commands/msg/pipe.go @@ -112,6 +112,9 @@ func (_ Pipe) Execute(aerc *widgets.Aerc, args []string) error { if pipeFull { store := provider.Store() + if store == nil { + return errors.New("Cannot perform action. Messages still loading") + } msg, err := provider.SelectedMessage() if err != nil { return err -- cgit v1.2.3