aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorben Günther <admin@xenrox.net>2019-11-22 13:33:05 +0100
committerDrew DeVault <sir@cmpwn.com>2019-11-25 11:49:46 -0500
commitc1d57977af3eae723406b3aaff82e7bf16b12d0c (patch)
tree4d9785843154f4cf99f64a2c1e6459118c51111c
parent06f81e8cd98b23f3fd6bf2813c25620084056243 (diff)
Fix crash if there is no to address for %F
-rw-r--r--lib/format/format.go2
1 files changed, 1 insertions, 1 deletions
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]
}