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
prioritization
Diva Canto 2009-10-08 07:55:06 -07:00
parent 1eb390beda
commit fc41f2e461
1 changed files with 9 additions and 0 deletions

View File

@ -74,6 +74,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public bool SendPackets(LLClientView client, int maxpack)
{
if (client == null)
return false;
if (m_currentPacket <= m_stopPacket)
{
int count = 0;
@ -202,6 +205,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
private bool SendFirstPacket(LLClientView client)
{
if (client == null)
return false;
if (m_asset == null)
{
m_log.Warn("[J2KIMAGE]: Sending ImageNotInDatabase for texture " + TextureID);
@ -234,6 +240,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
private bool SendPacket(LLClientView client)
{
if (client == null)
return false;
bool complete = false;
int imagePacketSize = ((int)m_currentPacket == (TexturePacketCount())) ? LastPacketSize() : IMAGE_PACKET_SIZE;