summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--commands/msg/pipe.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/commands/msg/pipe.go b/commands/msg/pipe.go
index c88d61f..20cb8b4 100644
--- a/commands/msg/pipe.go
+++ b/commands/msg/pipe.go
@@ -126,6 +126,9 @@ func (Pipe) Execute(aerc *widgets.Aerc, args []string) error {
 		})
 	} else if pipePart {
 		p := provider.SelectedMessagePart()
+		if p == nil {
+			return fmt.Errorf("could not fetch message part")
+		}
 		store := provider.Store()
 		store.FetchBodyPart(p.Msg.Uid, p.Index, func(reader io.Reader) {
 			if background {