-Asserted variable in WriteEscapedJavaScriptString is not null

This commit is contained in:
James Newton-King
2017-09-02 17:38:25 +12:00
parent 252704d416
commit f1d721d869
@@ -263,6 +263,8 @@ namespace Newtonsoft.Json.Utilities
// copy it over when creating new buffer
if (isEscapedUnicodeText)
{
Debug.Assert(writeBuffer != null, "Write buffer should never be null because it is set when the escaped unicode text is encountered.");
Array.Copy(writeBuffer, newBuffer, UnicodeTextLength);
}