Move SenseRepeaters.Count check inside the SenseRepeatListLock.

No methods in the List class are thread safe in the MS specification/documentation
0.7.2-post-fixes
Justin Clark-Casey (justincc) 2012-03-02 00:28:37 +00:00
parent 0c931e3657
commit a315aee803
1 changed files with 4 additions and 4 deletions

View File

@ -152,12 +152,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
public void CheckSenseRepeaterEvents()
{
// Nothing to do here?
if (SenseRepeaters.Count == 0)
return;
lock (SenseRepeatListLock)
{
// Nothing to do here?
if (SenseRepeaters.Count == 0)
return;
// Go through all timers
foreach (SenseRepeatClass ts in SenseRepeaters)
{