pipe: don't crash if part is nil
This commit is contained in:
parent
1790b1e7f0
commit
60c36ca1f1
|
@ -126,6 +126,9 @@ func (Pipe) Execute(aerc *widgets.Aerc, args []string) error {
|
||||||
})
|
})
|
||||||
} else if pipePart {
|
} else if pipePart {
|
||||||
p := provider.SelectedMessagePart()
|
p := provider.SelectedMessagePart()
|
||||||
|
if p == nil {
|
||||||
|
return fmt.Errorf("could not fetch message part")
|
||||||
|
}
|
||||||
store := provider.Store()
|
store := provider.Store()
|
||||||
store.FetchBodyPart(p.Msg.Uid, p.Index, func(reader io.Reader) {
|
store.FetchBodyPart(p.Msg.Uid, p.Index, func(reader io.Reader) {
|
||||||
if background {
|
if background {
|
||||||
|
|
Loading…
Reference in New Issue