Fix crash if there is no to address for %F

This commit is contained in:
Thorben Günther 2019-11-22 13:33:05 +01:00 committed by Drew DeVault
parent 06f81e8cd9
commit c1d57977af
1 changed files with 1 additions and 1 deletions

View File

@ -125,7 +125,7 @@ func ParseMessageFormat(
addr := msg.Envelope.From[0]
var val string
if addr.Name == accountFromAddress.Name {
if addr.Name == accountFromAddress.Name && len(msg.Envelope.To) != 0 {
addr = msg.Envelope.To[0]
}