diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs | 7 |
1 files changed, 7 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 a47e452..44a7c14 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 | fromRegionPos = avatar.AbsolutePosition; | 361 | fromRegionPos = avatar.AbsolutePosition; |
357 | q = avatar.Rotation; | 362 | q = avatar.Rotation; |
358 | } | 363 | } |
@@ -483,6 +488,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
483 | // Position of a sensor in a child prim attached to an avatar | 488 | // Position of a sensor in a child prim attached to an avatar |
484 | // will be still wrong. | 489 | // will be still wrong. |
485 | ScenePresence avatar = m_CmdManager.m_ScriptEngine.World.GetScenePresence(SensePoint.ParentGroup.AttachedAvatar); | 490 | ScenePresence avatar = m_CmdManager.m_ScriptEngine.World.GetScenePresence(SensePoint.ParentGroup.AttachedAvatar); |
491 | |||
492 | // Don't proceed if the avatar for this attachment has since been removed from the scene. | ||
486 | if (avatar == null) | 493 | if (avatar == null) |
487 | return sensedEntities; | 494 | return sensedEntities; |
488 | fromRegionPos = avatar.AbsolutePosition; | 495 | fromRegionPos = avatar.AbsolutePosition; |