send: fix crash if invalid password is given

This commit is contained in:
Reto Brunner 2021-02-05 21:20:17 +01:00
parent 8ea86cea41
commit 2d2010fd42
1 changed files with 2 additions and 1 deletions

View File

@ -113,6 +113,7 @@ func (Send) Execute(aerc *widgets.Aerc, args []string) error {
}
if err != nil {
failCh <- errors.Wrap(err, "send:")
return
}
var writer io.Writer = sender
@ -132,7 +133,7 @@ func (Send) Execute(aerc *widgets.Aerc, args []string) error {
go func() {
err = <-failCh
if err != nil {
aerc.PushError(err.Error())
aerc.PushError(strings.ReplaceAll(err.Error(), "\n", " "))
aerc.NewTab(composer, tabName)
return
}