Skip to content

Commit 39fab42

Browse files
committed
SOFT-1999 Null exception in NEventSocket.Util.StringExtensions.ToOriginateString
1 parent 28e25e8 commit 39fab42

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

NEventSocket/Util/StringExtensions.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,11 @@ public static string ToOriginateString(this IDictionary<string, string> dictiona
221221

222222
foreach (var kvp in dictionary)
223223
{
224-
sb.AppendFormat("{0}='{1}',", kvp.Key, kvp.Value.Replace(",", @"\,"));
224+
if (kvp.Value != null)
225+
{
226+
sb.AppendFormat("{0}='{1}',", kvp.Key, kvp.Value.Replace(",", @"\,"));
227+
}
225228
}
226-
227229
return StringBuilderPool.ReturnAndFree(sb);
228230
}
229231
}

0 commit comments

Comments
 (0)