summary refs log tree commit diff stats
path: root/lib/format
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 /lib/format
parent06f81e8cd98b23f3fd6bf2813c25620084056243 (diff)
downloadaerc-c1d57977af3eae723406b3aaff82e7bf16b12d0c.tar.gz
Fix crash if there is no to address for %F
Diffstat (limited to 'lib/format')
-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]
 			}
 
a> 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174