pipe: don't crash if part is nil

This commit is contained in:
Reto Brunner 2020-07-05 14:27:21 +02:00
parent 1790b1e7f0
commit 60c36ca1f1

View file

@ -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 {