aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorDiva Canto2009-10-08 07:55:06 -0700
committerDiva Canto2009-10-08 07:55:06 -0700
commitfc41f2e461255d051958160cabad3b0edf096566 (patch)
tree184ef789d047379f38698785dd496cc3fe9d6803 /OpenSim/Region
parentRemove ThreadTrackerTest. It's no longer relevant because the thread (diff)
downloadopensim-SC-fc41f2e461255d051958160cabad3b0edf096566.zip
opensim-SC-fc41f2e461255d051958160cabad3b0edf096566.tar.gz
opensim-SC-fc41f2e461255d051958160cabad3b0edf096566.tar.bz2
opensim-SC-fc41f2e461255d051958160cabad3b0edf096566.tar.xz
Added guards against the exception reported:
#2009-10-08 12:58:34,462 ERROR - OpenSim.Application [APPLICATION]: #APPLICATION EXCEPTION DETECTED: System.UnhandledExceptionEventArgs # #Exception: System.Exception: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object. # at OpenSim.Region.ClientStack.LindenUDP.J2KImage.SendFirstPacket(LLClientView client) in c:\Opensim\OpenSim\Region\ClientStack\LindenUDP\J2KImage.cs:line 230 # at OpenSim.Region.ClientStack.LindenUDP.J2KImage.SendPackets(LLClientView client, Int32 maxpack) in c:\Opensim\OpenSim\Region\ClientStack\LindenUDP\J2KImage.cs:line 84
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs9
1 files changed, 9 insertions, 0 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs b/OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs
index 2f1face..5877779 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs
@@ -74,6 +74,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
74 74
75 public bool SendPackets(LLClientView client, int maxpack) 75 public bool SendPackets(LLClientView client, int maxpack)
76 { 76 {
77 if (client == null)
78 return false;
79
77 if (m_currentPacket <= m_stopPacket) 80 if (m_currentPacket <= m_stopPacket)
78 { 81 {
79 int count = 0; 82 int count = 0;
@@ -202,6 +205,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
202 205
203 private bool SendFirstPacket(LLClientView client) 206 private bool SendFirstPacket(LLClientView client)
204 { 207 {
208 if (client == null)
209 return false;
210
205 if (m_asset == null) 211 if (m_asset == null)
206 { 212 {
207 m_log.Warn("[J2KIMAGE]: Sending ImageNotInDatabase for texture " + TextureID); 213 m_log.Warn("[J2KIMAGE]: Sending ImageNotInDatabase for texture " + TextureID);
@@ -234,6 +240,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
234 240
235 private bool SendPacket(LLClientView client) 241 private bool SendPacket(LLClientView client)
236 { 242 {
243 if (client == null)
244 return false;
245
237 bool complete = false; 246 bool complete = false;
238 int imagePacketSize = ((int)m_currentPacket == (TexturePacketCount())) ? LastPacketSize() : IMAGE_PACKET_SIZE; 247 int imagePacketSize = ((int)m_currentPacket == (TexturePacketCount())) ? LastPacketSize() : IMAGE_PACKET_SIZE;
239 248