pipe: don't crash if part is nil
This commit is contained in:
parent
1790b1e7f0
commit
60c36ca1f1
1 changed files with 3 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue