diff --git a/Client/Core/ProtoBuf/ProtoWriter.cs b/Client/Core/ProtoBuf/ProtoWriter.cs index 7939bfc5..c4100c00 100644 --- a/Client/Core/ProtoBuf/ProtoWriter.cs +++ b/Client/Core/ProtoBuf/ProtoWriter.cs @@ -472,7 +472,7 @@ void IDisposable.Dispose() Dispose(); } private void Dispose() - { // importantly, this does **not** own the stream, and does not dispose it + { if (dest != null) { Flush(this); diff --git a/Server/Core/ProtoBuf/ProtoWriter.cs b/Server/Core/ProtoBuf/ProtoWriter.cs index 7939bfc5..c4100c00 100644 --- a/Server/Core/ProtoBuf/ProtoWriter.cs +++ b/Server/Core/ProtoBuf/ProtoWriter.cs @@ -472,7 +472,7 @@ void IDisposable.Dispose() Dispose(); } private void Dispose() - { // importantly, this does **not** own the stream, and does not dispose it + { if (dest != null) { Flush(this);