diff options
author | Reto Brunner <reto@labrat.space> | 2020-07-05 14:27:21 +0200 |
---|---|---|
committer | Reto Brunner <reto@labrat.space> | 2020-07-05 14:27:21 +0200 |
commit | 60c36ca1f196074cbf0c5bc957737307e75b6cf0 (patch) | |
tree | 85f84deffd42c246252e7fc054dbc8464eeaabfc /commands/msg/pipe.go | |
parent | 1790b1e7f012d8be36d71e45d652609e107d055b (diff) | |
download | aerc-60c36ca1f196074cbf0c5bc957737307e75b6cf0.tar.gz |
pipe: don't crash if part is nil
Diffstat (limited to 'commands/msg/pipe.go')
-rw-r--r-- | commands/msg/pipe.go | 3 |
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 { |