From c1d57977af3eae723406b3aaff82e7bf16b12d0c Mon Sep 17 00:00:00 2001 From: Thorben Günther Date: Fri, 22 Nov 2019 13:33:05 +0100 Subject: Fix crash if there is no to address for %F --- lib/format/format.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/format/format.go b/lib/format/format.go index a070bc9..53d93aa 100644 --- a/lib/format/format.go +++ b/lib/format/format.go @@ -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] } -- cgit 1.4.1-2-gfad0