From 43df32c52cfd5bf536acf3434a0f7c482181d14b Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Thu, 17 Jul 2008 18:59:02 +0000 Subject: [PATCH] fix the null case for deep copy --- OpenSim/Data/NHibernate/TextureUserType.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/OpenSim/Data/NHibernate/TextureUserType.cs b/OpenSim/Data/NHibernate/TextureUserType.cs index dac7c75432..b688a1612b 100644 --- a/OpenSim/Data/NHibernate/TextureUserType.cs +++ b/OpenSim/Data/NHibernate/TextureUserType.cs @@ -49,8 +49,16 @@ namespace OpenSim.Data.NHibernate public object DeepCopy(object texture) { - byte[] bytes = ((LLObject.TextureEntry)texture).ToBytes(); - return new LLObject.TextureEntry(bytes, 0, bytes.Length); + 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(); + return new LLObject.TextureEntry(bytes, 0, bytes.Length); + } } public object Disassemble(object texture)