Added missing lock in EventQueue Enqueue.

dsg
Dan Lake 2011-01-11 11:40:14 -08:00
parent 7eb9affbd3
commit 6a24d0eb2d
1 changed files with 6 additions and 1 deletions

View File

@ -177,8 +177,13 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue
{ {
Queue<OSD> queue = GetQueue(avatarID); Queue<OSD> queue = GetQueue(avatarID);
if (queue != null) if (queue != null)
{
lock (queue)
{
queue.Enqueue(ev); queue.Enqueue(ev);
} }
}
}
catch(NullReferenceException e) catch(NullReferenceException e)
{ {
m_log.Error("[EVENTQUEUE] Caught exception: " + e); m_log.Error("[EVENTQUEUE] Caught exception: " + e);