From 532ae6d925e6111b5a1d24d19f752e3f22cf6445 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Mon, 13 Apr 2009 15:08:06 +0000 Subject: if Data is null, shortcut to client.SendImageNotFound, as any other option at this point is going to give us a NullReferenceException --- OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/ClientStack/LindenUDP') diff --git a/OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs b/OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs index 54be807..acb8497 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs @@ -147,11 +147,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP } return result; } + public bool SendFirstPacket(LLClientView client) { - + // this means we don't have + if (Data == null) + { + client.SendImageNotFound(m_requestedUUID); + m_log.WarnFormat("[TEXTURE]: Got null Data element on a asset {0}.. and the missing image Data property is al", m_requestedUUID); + return true; + } // Do we have less then 1 packet's worth of data? - if (m_asset.Data.Length <= cFirstPacketSize) + else if (m_asset.Data.Length <= cFirstPacketSize) { // Send only 1 packet client.SendImageFirstPart(1, m_requestedUUID, (uint)m_asset.Data.Length, m_asset.Data, 2); @@ -173,8 +180,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP } } return false; - } + private bool SendPacket(LLClientView client) { bool complete = false; -- cgit v1.1