diff options
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 0df1748..1f5946b 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -2533,6 +2533,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2533 | 2533 | ||
2534 | public void SendAsset(AssetRequestToClient req) | 2534 | public void SendAsset(AssetRequestToClient req) |
2535 | { | 2535 | { |
2536 | if (req.AssetInf.Data == null) | ||
2537 | { | ||
2538 | m_log.ErrorFormat("Cannot send asset {0} ({1}), asset data is null", | ||
2539 | req.AssetInf.ID, req.AssetInf.Metadata.ContentType); | ||
2540 | return; | ||
2541 | } | ||
2542 | |||
2536 | //m_log.Debug("sending asset " + req.RequestAssetID); | 2543 | //m_log.Debug("sending asset " + req.RequestAssetID); |
2537 | TransferInfoPacket Transfer = new TransferInfoPacket(); | 2544 | TransferInfoPacket Transfer = new TransferInfoPacket(); |
2538 | Transfer.TransferInfo.ChannelType = 2; | 2545 | Transfer.TransferInfo.ChannelType = 2; |
@@ -16193,6 +16200,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
16193 | const uint m_maxPacketSize = 600; | 16200 | const uint m_maxPacketSize = 600; |
16194 | int numPackets = 1; | 16201 | int numPackets = 1; |
16195 | 16202 | ||
16203 | if (data == null) | ||
16204 | return 0; | ||
16205 | |||
16196 | if (data.LongLength > m_maxPacketSize) | 16206 | if (data.LongLength > m_maxPacketSize) |
16197 | { | 16207 | { |
16198 | // over max number of bytes so split up file | 16208 | // over max number of bytes so split up file |