diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs index 88ab515..6e74227 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs | |||
@@ -353,6 +353,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
353 | // Position of a sensor in a child prim attached to an avatar | 353 | // Position of a sensor in a child prim attached to an avatar |
354 | // will be still wrong. | 354 | // will be still wrong. |
355 | ScenePresence avatar = m_CmdManager.m_ScriptEngine.World.GetScenePresence(SensePoint.ParentGroup.AttachedAvatar); | 355 | ScenePresence avatar = m_CmdManager.m_ScriptEngine.World.GetScenePresence(SensePoint.ParentGroup.AttachedAvatar); |
356 | |||
357 | // Don't proceed if the avatar for this attachment has since been removed from the scene. | ||
358 | if (avatar == null) | ||
359 | return sensedEntities; | ||
360 | |||
356 | q = avatar.GetWorldRotation() * q; | 361 | q = avatar.GetWorldRotation() * q; |
357 | } | 362 | } |
358 | 363 | ||
@@ -480,6 +485,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
480 | // Position of a sensor in a child prim attached to an avatar | 485 | // Position of a sensor in a child prim attached to an avatar |
481 | // will be still wrong. | 486 | // will be still wrong. |
482 | ScenePresence avatar = m_CmdManager.m_ScriptEngine.World.GetScenePresence(SensePoint.ParentGroup.AttachedAvatar); | 487 | ScenePresence avatar = m_CmdManager.m_ScriptEngine.World.GetScenePresence(SensePoint.ParentGroup.AttachedAvatar); |
488 | |||
489 | // Don't proceed if the avatar for this attachment has since been removed from the scene. | ||
490 | if (avatar == null) | ||
491 | return sensedEntities; | ||
492 | |||
483 | q = avatar.GetWorldRotation() * q; | 493 | q = avatar.GetWorldRotation() * q; |
484 | } | 494 | } |
485 | 495 | ||