Add some nullref checks to the UnackedPacketCollection.
parent
b58a47c373
commit
b017d985ab
|
@ -139,14 +139,27 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
private void ProcessQueues()
|
private void ProcessQueues()
|
||||||
{
|
{
|
||||||
// Process all the pending adds
|
// Process all the pending adds
|
||||||
|
|
||||||
OutgoingPacket pendingAdd;
|
OutgoingPacket pendingAdd;
|
||||||
|
if (m_pendingAdds != null)
|
||||||
|
{
|
||||||
while (m_pendingAdds.Dequeue(out pendingAdd))
|
while (m_pendingAdds.Dequeue(out pendingAdd))
|
||||||
|
{
|
||||||
|
if (pendingAdd != null && m_packets != null)
|
||||||
|
{
|
||||||
m_packets[pendingAdd.SequenceNumber] = pendingAdd;
|
m_packets[pendingAdd.SequenceNumber] = pendingAdd;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Process all the pending removes, including updating statistics and round-trip times
|
// Process all the pending removes, including updating statistics and round-trip times
|
||||||
PendingAck pendingRemove;
|
PendingAck pendingRemove;
|
||||||
OutgoingPacket ackedPacket;
|
OutgoingPacket ackedPacket;
|
||||||
|
if (m_pendingRemoves != null)
|
||||||
|
{
|
||||||
while (m_pendingRemoves.Dequeue(out pendingRemove))
|
while (m_pendingRemoves.Dequeue(out pendingRemove))
|
||||||
|
{
|
||||||
|
if (m_pendingRemoves != null && m_packets != null)
|
||||||
{
|
{
|
||||||
if (m_packets.TryGetValue(pendingRemove.SequenceNumber, out ackedPacket))
|
if (m_packets.TryGetValue(pendingRemove.SequenceNumber, out ackedPacket))
|
||||||
{
|
{
|
||||||
|
@ -166,4 +179,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue