fix the null case for deep copy

0.6.0-stable
Sean Dague 2008-07-17 18:59:02 +00:00
parent 0a01be9a86
commit 43df32c52c
1 changed files with 10 additions and 2 deletions

View File

@ -48,10 +48,18 @@ namespace OpenSim.Data.NHibernate
} }
public object DeepCopy(object texture) public object DeepCopy(object texture)
{
if (texture == null)
{
// TODO: should parametrize this texture out
return new LLObject.TextureEntry(new LLUUID("89556747-24cb-43ed-920b-47caed15465f"));
}
else
{ {
byte[] bytes = ((LLObject.TextureEntry)texture).ToBytes(); byte[] bytes = ((LLObject.TextureEntry)texture).ToBytes();
return new LLObject.TextureEntry(bytes, 0, bytes.Length); return new LLObject.TextureEntry(bytes, 0, bytes.Length);
} }
}
public object Disassemble(object texture) public object Disassemble(object texture)
{ {