aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/NHibernate
diff options
context:
space:
mode:
authorSean Dague2008-07-17 18:59:02 +0000
committerSean Dague2008-07-17 18:59:02 +0000
commit43df32c52cfd5bf536acf3434a0f7c482181d14b (patch)
tree6cd2facdd44a50172cacec988bbe132f03fcd610 /OpenSim/Data/NHibernate
parentmore safety checks (diff)
downloadopensim-SC-43df32c52cfd5bf536acf3434a0f7c482181d14b.zip
opensim-SC-43df32c52cfd5bf536acf3434a0f7c482181d14b.tar.gz
opensim-SC-43df32c52cfd5bf536acf3434a0f7c482181d14b.tar.bz2
opensim-SC-43df32c52cfd5bf536acf3434a0f7c482181d14b.tar.xz
fix the null case for deep copy
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/NHibernate/TextureUserType.cs12
1 files changed, 10 insertions, 2 deletions
diff --git a/OpenSim/Data/NHibernate/TextureUserType.cs b/OpenSim/Data/NHibernate/TextureUserType.cs
index dac7c75..b688a16 100644
--- a/OpenSim/Data/NHibernate/TextureUserType.cs
+++ b/OpenSim/Data/NHibernate/TextureUserType.cs
@@ -49,8 +49,16 @@ namespace OpenSim.Data.NHibernate
49 49
50 public object DeepCopy(object texture) 50 public object DeepCopy(object texture)
51 { 51 {
52 byte[] bytes = ((LLObject.TextureEntry)texture).ToBytes(); 52 if (texture == null)
53 return new LLObject.TextureEntry(bytes, 0, bytes.Length); 53 {
54 // TODO: should parametrize this texture out
55 return new LLObject.TextureEntry(new LLUUID("89556747-24cb-43ed-920b-47caed15465f"));
56 }
57 else
58 {
59 byte[] bytes = ((LLObject.TextureEntry)texture).ToBytes();
60 return new LLObject.TextureEntry(bytes, 0, bytes.Length);
61 }
54 } 62 }
55 63
56 public object Disassemble(object texture) 64 public object Disassemble(object texture)