-Don't call JsonWriter.Close when not disposing

This commit is contained in:
James Newton-King
2015-12-20 14:08:19 +13:00
parent dca5260334
commit 04c0e318be
+1 -1
View File
@@ -1446,7 +1446,7 @@ namespace Newtonsoft.Json
/// <param name="disposing"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param>
protected virtual void Dispose(bool disposing)
{
if (_currentState != State.Closed)
if (_currentState != State.Closed && disposing)
{
Close();
}