aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack
diff options
context:
space:
mode:
authorDiva Canto2009-10-04 07:41:10 -0700
committerDiva Canto2009-10-04 07:41:10 -0700
commit366bfe17ae46ddfe7b942b5851a1625072b4852b (patch)
treef366625d6d3c844af9e0c060327b803126f188d6 /OpenSim/Region/ClientStack
parentflexible extrusion shape defaults to linear (diff)
downloadopensim-SC-366bfe17ae46ddfe7b942b5851a1625072b4852b.zip
opensim-SC-366bfe17ae46ddfe7b942b5851a1625072b4852b.tar.gz
opensim-SC-366bfe17ae46ddfe7b942b5851a1625072b4852b.tar.bz2
opensim-SC-366bfe17ae46ddfe7b942b5851a1625072b4852b.tar.xz
Trying to avoid the null pointer exception in J2KImage, RunUpdate.
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs10
1 files changed, 9 insertions, 1 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs b/OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs
index 0e3630c..713d43a 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs
@@ -158,9 +158,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP
158 m_currentPacket = m_stopPacket; 158 m_currentPacket = m_stopPacket;
159 return; 159 return;
160 } 160 }
161 161
162 if (DiscardLevel >= 0 || m_stopPacket == 0) 162 if (DiscardLevel >= 0 || m_stopPacket == 0)
163 { 163 {
164 // This shouldn't happen, but if it does, we really can't proceed
165 if (Layers == null)
166 {
167 m_log.Warn("[J2KIMAGE]: RunUpdate() called with missing Layers. Canceling texture transfer");
168 m_currentPacket = m_stopPacket;
169 return;
170 }
171
164 int maxDiscardLevel = Math.Max(0, Layers.Length - 1); 172 int maxDiscardLevel = Math.Max(0, Layers.Length - 1);
165 173
166 // Treat initial texture downloads with a DiscardLevel of -1 a request for the highest DiscardLevel 174 // Treat initial texture downloads with a DiscardLevel of -1 a request for the highest DiscardLevel