From 39f5dd19736f0050a963c5257c8b3f2641819b37 Mon Sep 17 00:00:00 2001 From: Homer Horwitz Date: Mon, 6 Apr 2009 19:12:26 +0000 Subject: [PATCH] Added some null-checks to Intimidated's patch in r9024. Hopefully fixes Mantis #3415. --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index e0593eda1f..2c316a6abd 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -1962,7 +1962,7 @@ namespace OpenSim.Region.Framework.Scenes { //We're moving m_allowFalling = true; - if (PhysicsActor.IsColliding) + if (PhysicsActor != null && PhysicsActor.IsColliding) { //And colliding. Can you guess what it is yet? if ((m_movementflag & (uint)AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG) != 0) @@ -1999,7 +1999,7 @@ namespace OpenSim.Region.Framework.Scenes else { //We're not colliding. Colliding isn't cool these days. - if (PhysicsActor.Flying) + if (PhysicsActor != null && PhysicsActor.Flying) { //Are we moving forwards or backwards? if ((m_movementflag & (uint)AgentManager.ControlFlags.AGENT_CONTROL_AT_POS) != 0 || (m_movementflag & (uint)AgentManager.ControlFlags.AGENT_CONTROL_AT_NEG) != 0) @@ -2072,7 +2072,7 @@ namespace OpenSim.Region.Framework.Scenes else { //We're not moving. - if (PhysicsActor.IsColliding) + if (PhysicsActor != null && PhysicsActor.IsColliding) { //But we are colliding. if (m_movementAnimation == "FALLDOWN") @@ -2101,7 +2101,7 @@ namespace OpenSim.Region.Framework.Scenes { return "PREJUMP"; } - else if (PhysicsActor.Flying) + else if (PhysicsActor != null && PhysicsActor.Flying) { m_allowFalling = true; if ((m_movementflag & (uint)AgentManager.ControlFlags.AGENT_CONTROL_UP_POS) != 0) @@ -2126,7 +2126,7 @@ namespace OpenSim.Region.Framework.Scenes else { //We're not colliding. - if (PhysicsActor.Flying) + if (PhysicsActor != null && PhysicsActor.Flying) { return "HOVER";