When saving an oar/iar, don't attempt to write out the data byte array if it's empty
On Mono 2.6 (and probably before) this causes a non-obvious IOException0.6.9-post-fixes
parent
d446b19e72
commit
3b38cc10de
|
@ -208,7 +208,9 @@ namespace OpenSim.Framework.Serialization
|
|||
m_bw.Write(header);
|
||||
|
||||
// Write out data
|
||||
m_bw.Write(data);
|
||||
// An IOException occurs if we try to write out an empty array in Mono 2.6
|
||||
if (data.Length > 0)
|
||||
m_bw.Write(data);
|
||||
|
||||
if (data.Length % 512 != 0)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue