From d48ed03024382c484e01facbab5e01d8f37690ac Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Tue, 1 Dec 2015 19:07:51 +0100 Subject: [PATCH] Fix to yet another ugly bug --- Utility/Communications/CommsTransmitterMail.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Utility/Communications/CommsTransmitterMail.cs b/Utility/Communications/CommsTransmitterMail.cs index daeadca7..438562ec 100644 --- a/Utility/Communications/CommsTransmitterMail.cs +++ b/Utility/Communications/CommsTransmitterMail.cs @@ -54,7 +54,7 @@ namespace Swarmops.Utility.Communications string mailBodyText = (string)comm[CommRenderPart.BodyText]; mailBodyText = mailBodyText.Replace("[Addressee]", person.Canonical); - string mailBodyHtml = (string)comm[CommRenderPart.BodyHtml]; + string mailBodyHtml = comm.ContainsKey(CommRenderPart.BodyHtml)? (string)comm[CommRenderPart.BodyHtml]: string.Empty; mailBodyHtml = mailBodyHtml.Replace("[Addressee]", person.Canonical); mail.Subject = (string)comm[CommRenderPart.Subject];