diff --git a/Libraries/UniversalEditor.Core/IO/Writer.cs b/Libraries/UniversalEditor.Core/IO/Writer.cs index f909cdbf..0ca9ef2c 100644 --- a/Libraries/UniversalEditor.Core/IO/Writer.cs +++ b/Libraries/UniversalEditor.Core/IO/Writer.cs @@ -609,6 +609,9 @@ namespace UniversalEditor.IO /// The stream is closed. public void WriteObject(object value) { + if (value == null) + return; + if (value is object[]) { object[] array = (object[])value; @@ -621,7 +624,12 @@ namespace UniversalEditor.IO Type objectType = value.GetType(); - if (objectType == typeof(Byte)) + if (objectType == typeof(Boolean)) + { + WriteBoolean((bool)value); + return; + } + else if (objectType == typeof(Byte)) { WriteByte((byte)value); return;