From c4b6010fb34268c9426f7241a38ba892b93780d1 Mon Sep 17 00:00:00 2001 From: Teravus Ovares (Dan Olivares) Date: Sat, 5 Dec 2009 13:01:21 -0500 Subject: * Fixes mantis 4416. Animator is dereferenced on logout --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 5 +++-- OpenSim/Region/Physics/OdePlugin/ODECharacter.cs | 5 ++++- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index b2cd249..a3ceecb 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -2932,14 +2932,15 @@ namespace OpenSim.Region.Framework.Scenes //if ((Math.Abs(Velocity.X) > 0.1e-9f) || (Math.Abs(Velocity.Y) > 0.1e-9f)) // The Physics Scene will send updates every 500 ms grep: m_physicsActor.SubscribeEvents( // as of this comment the interval is set in AddToPhysicalScene - Animator.UpdateMovementAnimations(); + if (Animator!=null) + Animator.UpdateMovementAnimations(); CollisionEventUpdate collisionData = (CollisionEventUpdate)e; Dictionary coldata = collisionData.m_objCollisionList; CollisionPlane = Vector4.UnitW; - if (coldata.Count != 0) + if (coldata.Count != 0 && Animator != null) { switch (Animator.CurrentMovementAnimation) { diff --git a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs index 1bc4a25..40fbde1 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs @@ -1221,7 +1221,10 @@ namespace OpenSim.Region.Physics.OdePlugin { if (m_eventsubscription > m_requestedUpdateFrequency) { - base.SendCollisionUpdate(CollisionEventsThisFrame); + if (CollisionEventsThisFrame != null) + { + base.SendCollisionUpdate(CollisionEventsThisFrame); + } CollisionEventsThisFrame = new CollisionEventUpdate(); m_eventsubscription = 0; } -- cgit v1.1