From 0209033dd9e2d4b4e4554d626d2e00388268e080 Mon Sep 17 00:00:00 2001 From: Tom Grimshaw Date: Tue, 1 Jun 2010 13:22:24 -0700 Subject: Gosh, fixing another nullref issue in cmGetAvatarList. I deserve spanks. --- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/CM_Api.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/ScriptEngine') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/CM_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/CM_Api.cs index 4f1e9f7..5b180ff 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/CM_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/CM_Api.cs @@ -98,9 +98,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { if (avatar.IsChildAgent == false) { - result.Add(avatar.UUID); - result.Add(avatar.PhysicsActor.Position); - result.Add(avatar.Name); + if (avatar.PhysicsActor != null && avatar.PhysicsActor.Position != null) + { + result.Add(avatar.UUID); + result.Add(avatar.PhysicsActor.Position); + result.Add(avatar.Name); + } } } } -- cgit v1.1