diff --git a/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs b/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs index 6ecc0c80d2..39882fb294 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs @@ -111,11 +111,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP { lock (SyncRoot) { - if (packets.Count == 0) - return null; + OutgoingPacket p; using (SortedDictionary.ValueCollection.Enumerator e = packets.Values.GetEnumerator()) - return e.Current; + p = e.Current; + + return p; } }