aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Modules')
-rw-r--r--OpenSim/Region/Environment/Modules/TextureDownloadModule.cs10
1 files changed, 9 insertions, 1 deletions
diff --git a/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs b/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs
index d126569..0adace1 100644
--- a/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs
+++ b/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs
@@ -319,7 +319,15 @@ namespace OpenSim.Region.Environment.Modules
319 int size = m_asset.Data.Length - 600 - (1000 * (PacketCounter - 1)); 319 int size = m_asset.Data.Length - 600 - (1000 * (PacketCounter - 1));
320 if (size > 1000) size = 1000; 320 if (size > 1000) size = 1000;
321 im.ImageData.Data = new byte[size]; 321 im.ImageData.Data = new byte[size];
322 Array.Copy(m_asset.Data, 600 + (1000 * (PacketCounter - 1)), im.ImageData.Data, 0, size); 322 try
323 {
324 Array.Copy(m_asset.Data, 600 + (1000 * (PacketCounter - 1)), im.ImageData.Data, 0, size);
325 }
326 catch (System.ArgumentOutOfRangeException)
327 {
328 OpenSim.Framework.Console.MainLog.Instance.Warn("TEXTURE", "Unable to separate texture into multiple packets: Array bounds failure on asset:" + m_asset.FullID.ToString() + "- TextureDownloadModule.cs. line:328");
329 return;
330 }
323 RequestUser.OutPacket(im, ThrottleOutPacketType.Texture); 331 RequestUser.OutPacket(im, ThrottleOutPacketType.Texture);
324 PacketCounter++; 332 PacketCounter++;
325 } 333 }