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

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