about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--html.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/html.c b/html.c
index c3b47fd..5104667 100644
--- a/html.c
+++ b/html.c
@@ -47,9 +47,10 @@ static char *htmlMailto(struct Address addr) {
 }
 
 static int htmlAddress(FILE *file, struct Address addr, bool comma) {
-	char *mailto = htmlMailto(addr);
+	char *mailto = NULL;
 	const char *template;
 	if (addr.host) {
+		mailto = htmlMailto(addr);
 		template = Q([,]<a href="[mailto]">[name]</a>);
 	} else if (addr.mailbox) {
 		template = "[mailbox]: ";
@@ -109,6 +110,7 @@ static char *htmlMbox(const char *messageID) {
 
 static int htmlReplyCc(FILE *file, bool first, struct AddressList list) {
 	for (size_t i = 0; i < list.len; ++i) {
+		if (!list.addrs[i].mailbox || !list.addrs[i].host) continue;
 		const char *template = "[,][mailbox]@[host]";
 		struct Variable vars[] = {
 			{ "mailbox", list.addrs[i].mailbox },