Add null check
authorThomas
Thu, 11 Oct 2018 12:18:26 +0200
changeset 24055153acd8eb86
parent 2404 a1760ea7715b
child 2406 dcffbae23df9
Add null check
PEPMessage.cs
     1.1 --- a/PEPMessage.cs	Thu Oct 11 10:58:49 2018 +0200
     1.2 +++ b/PEPMessage.cs	Thu Oct 11 12:18:26 2018 +0200
     1.3 @@ -2786,7 +2786,7 @@
     1.4                      string autocryptHeaderKey = "Autocrypt";
     1.5                      try
     1.6                      {
     1.7 -                        Header ac = headers.FirstOrDefault(a => (a.Field?.Trim()?.Equals(autocryptHeaderKey, StringComparison.OrdinalIgnoreCase) == true));
     1.8 +                        Header ac = headers?.FirstOrDefault(a => (a.Field?.Trim()?.Equals(autocryptHeaderKey, StringComparison.OrdinalIgnoreCase) == true));
     1.9                          if (ac != null)
    1.10                          {
    1.11                              StringPair autocryptHeader = new StringPair