counting issus safeguard

melanie
UbitUmarov 2016-11-17 20:59:13 +00:00
parent 35b37510fc
commit e21ac8b3c4
1 changed files with 4 additions and 2 deletions

View File

@ -93,7 +93,10 @@ namespace OpenSim.Framework
if (oldHead == oldTail)
{
if (oldHeadNext == null)
{
count = 0;
return false;
}
CAS(ref tail, oldTail, oldHeadNext);
}
@ -118,8 +121,7 @@ namespace OpenSim.Framework
{
// ugly
T item;
while(count > 0)
Dequeue(out item);
while(Dequeue(out item));
Init();
}