Add null check for unit tests
authorThomas
Tue, 22 May 2018 16:25:09 +0200
changeset 2208 7051e9283317
parent 2204 94aaeb734ef2
child 2209 bebcde071bec
child 2211 7d2c2dd47c17
Add null check for unit tests
MsgProcessor.cs
--- a/MsgProcessor.cs	Fri May 18 12:14:05 2018 +0200
+++ b/MsgProcessor.cs	Tue May 22 16:25:09 2018 +0200
@@ -928,7 +928,7 @@
             bool success = false;
             TextMessage src = new TextMessage();
             TextMessage dst = new TextMessage();
-            string[] dstKeyList = Globals.ThisAddIn.Settings.ExtraKeys ?? new string[0];
+            string[] dstKeyList = Globals.ThisAddIn?.Settings?.ExtraKeys ?? new string[0];
             pEpRating rating = pEpRating.pEpRatingCannotDecrypt;
             Globals.ReturnStatus sts;