diff options
author | John Hurliman | 2010-03-16 11:50:22 -0700 |
---|---|---|
committer | John Hurliman | 2010-03-16 11:50:22 -0700 |
commit | b4dcdffb5094c488a98acbe675b333c3bd4cc570 (patch) | |
tree | 14998b10e4d13d2dd933a5d5e014db1f4bb07b43 /OpenSim/Framework/PrimitiveBaseShape.cs | |
parent | * Fixing the SimianGrid friend connector enabled detection since the friends ... (diff) | |
download | opensim-SC_OLD-b4dcdffb5094c488a98acbe675b333c3bd4cc570.zip opensim-SC_OLD-b4dcdffb5094c488a98acbe675b333c3bd4cc570.tar.gz opensim-SC_OLD-b4dcdffb5094c488a98acbe675b333c3bd4cc570.tar.bz2 opensim-SC_OLD-b4dcdffb5094c488a98acbe675b333c3bd4cc570.tar.xz |
Fixed several unhandled exceptions and performance issues with PrimitiveBaseShape.Textures. This really should be moved from a property to a method if it is going to decode a byte[] into a TextureEntry each time
Diffstat (limited to 'OpenSim/Framework/PrimitiveBaseShape.cs')
-rw-r--r-- | OpenSim/Framework/PrimitiveBaseShape.cs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/OpenSim/Framework/PrimitiveBaseShape.cs b/OpenSim/Framework/PrimitiveBaseShape.cs index 6a38278..9c2a4f9 100644 --- a/OpenSim/Framework/PrimitiveBaseShape.cs +++ b/OpenSim/Framework/PrimitiveBaseShape.cs | |||
@@ -227,8 +227,12 @@ namespace OpenSim.Framework | |||
227 | { | 227 | { |
228 | get | 228 | get |
229 | { | 229 | { |
230 | //m_log.DebugFormat("[PRIMITIVE BASE SHAPE]: get m_textureEntry length {0}", m_textureEntry.Length); | 230 | //m_log.DebugFormat("[SHAPE]: get m_textureEntry length {0}", m_textureEntry.Length); |
231 | return new Primitive.TextureEntry(m_textureEntry, 0, m_textureEntry.Length); | 231 | try { return new Primitive.TextureEntry(m_textureEntry, 0, m_textureEntry.Length); } |
232 | catch { } | ||
233 | |||
234 | m_log.Warn("[SHAPE]: Failed to decode texture, length=" + ((m_textureEntry != null) ? m_textureEntry.Length : 0)); | ||
235 | return new Primitive.TextureEntry(null); | ||
232 | } | 236 | } |
233 | 237 | ||
234 | set { m_textureEntry = value.GetBytes(); } | 238 | set { m_textureEntry = value.GetBytes(); } |