From 740ce20d9df4327aaf9660613b9ce11a81d53c83 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Wed, 20 Feb 2008 20:07:12 +0000 Subject: * Found the land bug, yay --- OpenSim/Region/Physics/Manager/PhysicsActor.cs | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/Physics') diff --git a/OpenSim/Region/Physics/Manager/PhysicsActor.cs b/OpenSim/Region/Physics/Manager/PhysicsActor.cs index 088d85a..f44c160 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsActor.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsActor.cs @@ -136,9 +136,13 @@ namespace OpenSim.Region.Physics.Manager // a race condition if the last subscriber unsubscribes // immediately after the null check and before the event is raised. RequestTerseUpdate handler = OnRequestTerseUpdate; + if (handler != null) { - handler(); + lock (handler) + { + handler(); + } } } @@ -150,17 +154,25 @@ namespace OpenSim.Region.Physics.Manager OutOfBounds handler = OnOutOfBounds; if (handler != null) { - handler(pos); + lock (handler) + { + handler(pos); + } } } public virtual void SendCollisionUpdate(EventArgs e) { CollisionUpdate handler = OnCollisionUpdate; + if (handler != null) - { - handler(e); + { + lock (handler) + { + handler(e); + } } + } -- cgit v1.1